Header file containing functions prototypes of SPI app library. More...
Go to the source code of this file.
Data Structures | |
| struct | app_spi_pin_t |
| SPI IO Structures. More... | |
| struct | app_spi_pin_cfg_t |
| SPI IO configuration Structures. More... | |
| struct | app_spi_mode_t |
| SPI operate mode Enumerations definition. More... | |
| struct | app_spi_params_t |
| SPI parameters structure definition. More... | |
| struct | app_spi_evt_t |
| SPI event structure definition. More... | |
Macros | |
| #define | APP_SPI_PIN_ENABLE 1 |
| #define | APP_SPI_PIN_DISABLE 0 |
Typedefs | |
| typedef void(* | app_spi_evt_handler_t) (app_spi_evt_t *p_evt) |
| SPI event callback definition. | |
Enumerations | |
| enum | app_spi_id_t { APP_SPI_ID_SLAVE, APP_SPI_ID_MASTER, APP_SPI_ID_MAX, APP_SPI_ID_SLAVE, APP_SPI_ID_MASTER, APP_SPI_ID_MAX } |
| SPI module Enumerations definition. More... | |
| enum | app_spi_type_t { APP_SPI_TYPE_INTERRUPT, APP_SPI_TYPE_POLLING, APP_SPI_TYPE_DMA, APP_SPI_TYPE_MAX, APP_SPI_TYPE_POLLING, APP_SPI_TYPE_DMA, APP_SPI_TYPE_MAX } |
| SPI operating mode Enumerations definition. More... | |
| enum | app_spi_datawidth_t { APP_SPI_DATAWIDTH_8BIT = 0x00, APP_SPI_DATAWIDTH_32BIT } |
| SPI operating mode Enumerations definition. More... | |
| enum | app_spi_evt_type_t { APP_SPI_EVT_ERROR, APP_SPI_EVT_TX_CPLT, APP_SPI_EVT_RX_DATA, APP_SPI_EVT_TX_RX, APP_SPI_EVT_ERROR, APP_SPI_EVT_TX_CPLT, APP_SPI_EVT_RX_DATA, APP_SPI_EVT_TX_RX } |
| SPI event Enumerations definition. More... | |
Functions | |
| uint16_t | app_spi_v2_init (app_spi_params_t *p_params, app_spi_evt_handler_t evt_handler) |
| Initialize the APP SPI DRIVER according to the specified parameters in the app_spi_params_t and app_spi_evt_handler_t. More... | |
| uint16_t | app_spi_v2_deinit (app_spi_id_t id) |
| De-initialize the APP SPI DRIVER peripheral. More... | |
| uint16_t | app_spi_v2_transmit_poll_sync (app_spi_id_t id, app_spi_datawidth_t data_width, uint8_t *p_data, uint16_t size, uint32_t timeout) |
| Transmits in master or slave mode an amount of data in blocking mode, without inst & addr. More... | |
| uint16_t | app_spi_v2_transmit_with_ia_poll_sync (app_spi_id_t id, app_spi_datawidth_t data_width, uint8_t inst, uint32_t addr, uint8_t *p_data, uint16_t size, uint32_t timeout) |
| Transmits an amount of data in blocking mode in master mode , with inst & addr. More... | |
| uint16_t | app_spi_v2_receive_poll_sync (app_spi_id_t id, app_spi_datawidth_t data_width, uint8_t *p_data, uint16_t size, uint32_t timeout) |
| Receive in master or slave mode an amount of data in blocking mode , without inst & addr. More... | |
| uint16_t | app_spi_v2_receive_with_ia_poll_sync (app_spi_id_t id, app_spi_datawidth_t data_width, uint8_t inst, uint32_t addr, uint8_t *p_data, uint16_t size, uint32_t timeout) |
| Receivean amount of data in blocking mode in master mode with instruction and address . More... | |
| uint16_t | app_spi_v2_transmit_receive_8bit_poll_sync (app_spi_id_t id, uint8_t *tx_data, uint16_t tx_size, uint8_t *rx_data, uint16_t rx_size, uint32_t timeout) |
| Transmits then Receive an amount of data in blocking mode in master mode . More... | |
| uint16_t | app_spi_v2_transmit_dma_sync (app_spi_id_t id, app_spi_datawidth_t data_width, uint8_t *p_data, uint16_t size) |
| Transmits in master mode an amount of data in dma mode, without inst & addr. More... | |
| uint16_t | app_spi_v2_transmit_with_ia_dma_sync (app_spi_id_t id, app_spi_datawidth_t data_width, uint8_t inst, uint32_t addr, uint8_t *p_data, uint16_t size) |
| Transmits in master mode an amount of data in dma mode, with inst & addr. More... | |
| uint16_t | app_spi_v2_receive_dma_sync (app_spi_id_t id, app_spi_datawidth_t data_width, uint8_t *p_data, uint16_t size) |
| Receive in master mode an amount of data in dma mode, without inst & addr. More... | |
| uint16_t | app_spi_v2_receive_with_ia_dma_sync (app_spi_id_t id, app_spi_datawidth_t data_width, uint8_t inst, uint32_t addr, uint8_t *p_data, uint16_t size) |
| spi_handle_t * | app_spi_v2_get_handle (app_spi_id_t id) |
| Return the SPI handle. More... | |
Header file containing functions prototypes of SPI app library.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.