|
Data Structures | |
| struct | spi_master_polled |
| Polled SPI master defintion. More... | |
| struct | spi_device |
| Polled SPI device defintion. More... | |
Modules | |
| Common ATmega and ATxmega SPI internals | |
Typedefs | |
| typedef void(* | spi_start_func_t )(struct spi_master *spim, uint8_t tx_byte) |
| SPI start transfer function. | |
Enumerations | |
| enum | spi_polled_op_flags { SPI_OP_WRITE, SPI_OP_READ, SPI_OP_BUFFER } |
Flags for SPI polled operation. More... | |
Functions | |
| void | spi_polled_start (struct spi_master *spim, uint8_t tx_byte, size_t residue) |
| Start polled SPI transfer. | |
| void | spi_polled_write (struct spi_master *spim, const uint8_t *data, size_t len) |
| void | spi_polled_read (struct spi_master *spim, uint8_t *data, size_t len) |
| void | spi_polled_exchange (struct spi_master *spim, const uint8_t *write, uint8_t *read, size_t len) |
| void | spi_polled_master_init (struct spi_master *spim, workqueue_func_t poll, spi_start_func_t start) |
| Initialize polled SPI master struct. | |
| void | spi_polled_next_buffer (struct workqueue_task *task) |
| Iterate to next buffer in SPI buffer list operation. | |
| void | spi_polled_write_buf_list (struct spi_master *spim, struct slist *buf_list) |
| void | spi_polled_read_buf_list (struct spi_master *spim, struct slist *buf_list) |
| void | spi_polled_exchange_buf_list (struct spi_master *spim, struct slist *write_buf_list, struct slist *read_buf_list) |
| static struct spi_master_polled * | spi_master_polled_of (struct spi_master *base) |
| Return SPI master polled from SPI master. | |
| static bool | spi_polled_is_buffer_op (struct spi_master *spim) |
| Test if polled SPI operation is using buffer list. | |
| static void | spi_polled_sched_poll (struct spi_master *spim) |
| Schedule SPI poll operation. | |
| static void | spi_polled_sched_next_buffer (struct spi_master *spim) |
| Schedule buffer list handling. | |
| static void | spi_polled_buf_list_init (struct spi_master *spim) |
| Initialize polled SPI master. | |
| typedef void(* spi_start_func_t)(struct spi_master *spim, uint8_t tx_byte) |
SPI start transfer function.
| spim | SPI master struct | |
| tx_byte | First byte to be written |
Definition at line 64 of file spi_polled.h.
| enum spi_polled_op_flags |
Flags for SPI polled operation.
| SPI_OP_WRITE |
Write operation. |
| SPI_OP_READ |
Read operation. |
| SPI_OP_BUFFER |
buffer list operation |
Definition at line 52 of file spi_polled.h.
| static struct spi_master_polled* spi_master_polled_of | ( | struct spi_master * | base | ) | [static, read] |
Return SPI master polled from SPI master.
| base | SPI master struct |
Definition at line 106 of file spi_polled.h.
References container_of.
Referenced by spi_polled_buf_list_init(), spi_polled_is_buffer_op(), spi_polled_sched_next_buffer(), and spi_polled_sched_poll().
| static void spi_polled_buf_list_init | ( | struct spi_master * | spim | ) | [inline, static] |
Initialize polled SPI master.
| spim | SPI master struct |
Definition at line 184 of file spi_polled.h.
References spi_master_polled_of(), spi_polled_next_buffer(), and workqueue_task_init().
| void spi_polled_exchange | ( | struct spi_master * | spim, | |
| const uint8_t * | write, | |||
| uint8_t * | read, | |||
| size_t | len | |||
| ) |
| void spi_polled_exchange_buf_list | ( | struct spi_master * | spim, | |
| struct slist * | write_buf_list, | |||
| struct slist * | read_buf_list | |||
| ) |
| static bool spi_polled_is_buffer_op | ( | struct spi_master * | spim | ) | [inline, static] |
Test if polled SPI operation is using buffer list.
| spim | SPI master struct |
| true | Operation is buffer based | |
| false | Operation is not buffer based |
Definition at line 123 of file spi_polled.h.
References spi_master_polled::op, spi_master_polled_of(), SPI_OP_BUFFER, and test_bit.
Referenced by spi_poll().
| void spi_polled_master_init | ( | struct spi_master * | spim, | |
| workqueue_func_t | poll, | |||
| spi_start_func_t | start | |||
| ) |
Initialize polled SPI master struct.
| spim | SPI master struct | |
| poll | Poll function | |
| start | Start function |
| void spi_polled_next_buffer | ( | struct workqueue_task * | task | ) |
Iterate to next buffer in SPI buffer list operation.
| task | Task struct |
Referenced by spi_polled_buf_list_init().
| void spi_polled_read | ( | struct spi_master * | spim, | |
| uint8_t * | data, | |||
| size_t | len | |||
| ) |
| void spi_polled_read_buf_list | ( | struct spi_master * | spim, | |
| struct slist * | buf_list | |||
| ) |
| static void spi_polled_sched_next_buffer | ( | struct spi_master * | spim | ) | [inline, static] |
Schedule buffer list handling.
| spim | SPI master struct |
Definition at line 153 of file spi_polled.h.
References main_workqueue, spi_master_polled_of(), and workqueue_add_task().
Referenced by spi_poll().
| static void spi_polled_sched_poll | ( | struct spi_master * | spim | ) | [inline, static] |
Schedule SPI poll operation.
| spim | SPI master struct |
Definition at line 139 of file spi_polled.h.
References main_workqueue, spi_master_polled::poll, spi_master_polled_of(), and workqueue_add_task().
Referenced by spi_poll().
| void spi_polled_start | ( | struct spi_master * | spim, | |
| uint8_t | tx_byte, | |||
| size_t | residue | |||
| ) |
Start polled SPI transfer.
| spim | SPI master struct | |
| tx_byte | Initial byte to send | |
| residue | Length of remaining bytes |
| void spi_polled_write | ( | struct spi_master * | spim, | |
| const uint8_t * | data, | |||
| size_t | len | |||
| ) |
| void spi_polled_write_buf_list | ( | struct spi_master * | spim, | |
| struct slist * | buf_list | |||
| ) |
1.6.3