Microchip® Advanced Software Framework

nm_bus_wrapper_samd21.c File Reference

This module contains WINC3400 bus wrapper APIs implementation.

Copyright (c) 2017-2021 Microchip Technology Inc. and its subsidiaries.

#include <stdio.h>
#include "bsp/include/nm_bsp.h"
#include "common/include/nm_common.h"
#include "bus_wrapper/include/nm_bus_wrapper.h"
#include "spi.h"
#include "port.h"
#include "conf_winc.h"
#include <asf.h>

Macros

#define NM_BUS_MAX_TRX_SZ   256
 

Functions

sint8 nm_bus_deinit (void)
 De-initialize the bus wrapper. More...
 
sint8 nm_bus_init (uint8 *pvinit, uint32 req_serial_number)
 
sint8 nm_bus_ioctl (uint8 u8Cmd, void *pvParameter)
 
sint8 nm_bus_reinit (void *config)
 
sint8 nm_spi_rw (uint8 *pu8Mosi, uint8 *pu8Miso, uint16 u16Sz)
 
static sint8 spi_rw_pio (uint8 *pu8Mosi, uint8 *pu8Miso, uint16 u16Sz)
 

Variables

tstrNmBusCapabilities egstrNmBusCapabilities
 
struct spi_module master
 
struct spi_slave_inst slave_inst
 

#define NM_BUS_MAX_TRX_SZ   256

sint8 nm_bus_reinit ( void *  config)

References M2M_SUCCESS.

sint8 nm_spi_rw ( uint8 pu8Mosi,
uint8 pu8Miso,
uint16  u16Sz 
)
static sint8 spi_rw_pio ( uint8 pu8Mosi,
uint8 pu8Miso,
uint16  u16Sz 
)
inlinestatic

tstrNmBusCapabilities egstrNmBusCapabilities
Initial value:
=
{
}
#define NM_BUS_MAX_TRX_SZ
Definition: nm_bus_wrapper_samd21.c:49

Referenced by nm_read_block(), and nm_write_block().

struct spi_module master
struct spi_slave_inst slave_inst

Referenced by nm_bus_init(), and spi_rw_pio().