This module contains WINC3400 bus wrapper APIs declarations.
Copyright (c) 2017-2019 Microchip Technology Inc. and its subsidiaries.
#include "common/include/nm_common.h"
Data Structures | |
struct | tstrNmBusCapabilities |
Structure holding bus capabilities information. More... | |
struct | tstrNmI2cDefault |
Structure holding I2C default operation parameters. More... | |
struct | tstrNmI2cSpecial |
Structure holding I2C special operation parameters. More... | |
struct | tstrNmSpiRw |
Structure holding SPI R/W parameters. More... | |
struct | tstrNmUartDefault |
Structure holding UART default operation parameters. More... | |
Macros | |
#define | NM_BUS_IOCTL_R ((uint8)0) |
IOCTL commands. More... | |
#define | NM_BUS_IOCTL_RW ((uint8)3) |
#define | NM_BUS_IOCTL_W ((uint8)1) |
#define | NM_BUS_IOCTL_W_SPECIAL ((uint8)2) |
#define | NM_BUS_IOCTL_WR_RESTART ((uint8)4) |
#define | NM_BUS_TYPE_I2C ((uint8)0) |
BUS Type. More... | |
#define | NM_BUS_TYPE_SPI ((uint8)1) |
#define | NM_BUS_TYPE_UART ((uint8)2) |
Functions | |
sint8 | nm_bus_deinit (void) |
De-initialize the bus wrapper. More... | |
sint8 | nm_bus_init (uint8 *req_com_port, uint32 req_serial_number) |
sint8 | nm_bus_ioctl (uint8 u8Cmd, void *pvParameter) |
sint8 | nm_bus_reinit (void *) |
Variables | |
tstrNmBusCapabilities | egstrNmBusCapabilities |
#define NM_BUS_IOCTL_R ((uint8)0) |
IOCTL commands.
Read only ==> I2C/UART. Parameter:tstrNmI2cDefault/tstrNmUartDefault
Referenced by nm_bus_ioctl().
#define NM_BUS_IOCTL_RW ((uint8)3) |
Read/Write at the same time ==> SPI only. Parameter:tstrNmSpiRw
Referenced by nm_bus_ioctl().
#define NM_BUS_IOCTL_W ((uint8)1) |
Write only ==> I2C/UART. Parameter type tstrNmI2cDefault/tstrNmUartDefault
Referenced by nm_bus_ioctl().
#define NM_BUS_IOCTL_W_SPECIAL ((uint8)2) |
Write two buffers within the same transaction (same start/stop conditions) ==> I2C only. Parameter:tstrNmI2cSpecial
Referenced by nm_bus_ioctl().
#define NM_BUS_IOCTL_WR_RESTART ((uint8)4) |
Write buffer then made restart condition then read ==> I2C only. parameter:tstrNmI2cSpecial
#define NM_BUS_TYPE_I2C ((uint8)0) |
BUS Type.
#define NM_BUS_TYPE_SPI ((uint8)1) |
#define NM_BUS_TYPE_UART ((uint8)2) |
sint8 nm_bus_deinit | ( | void | ) |
De-initialize the bus wrapper.
References spi_master_config::baudrate, i2c_master_config::buffer_timeout, dma_add_descriptor(), dma_allocate(), DMA_CALLBACK_TRANSFER_DONE, dma_descriptor_get_config_defaults(), dma_enable_callback(), dma_get_config_defaults(), dma_register_callback(), DMA_TRIGGER_ACTION_BEAT, i2c_master_enable(), i2c_master_get_config_defaults(), i2c_master_init(), i2c_master_instance, M2M_ERR_BUS_FAIL, M2M_SUCCESS, master, spi_config::master, spi_config::master_slave_select_enable, spi_config::mode_specific, spi_config::mux_setting, nm_bsp_reset(), nm_bsp_sleep(), dma_resource_config::peripheral_trigger, spi_config::pinmux_pad0, spi_config::pinmux_pad1, spi_config::pinmux_pad2, spi_config::pinmux_pad3, result, slave_inst, spi_attach_slave(), spi_enable(), spi_get_config_defaults(), spi_init(), spi_slave_inst_get_config_defaults(), spi_slave_inst_config::ss_pin, STATUS_OK, and dma_resource_config::trigger_action.
Referenced by nm_bus_iface_init().
sint8 nm_bus_reinit | ( | void * | ) |
tstrNmBusCapabilities egstrNmBusCapabilities |