NetBurner 3.1
nmspi.h
Go to the documentation of this file.
1 
42 #ifndef _NMSPI_H_
43 #define _NMSPI_H_
44 
46 
47 #ifdef __cplusplus
48  extern "C" {
49 #endif
50 
56 sint8 nm_spi_init(void);
57 /*
58 * @fn nm_spi_deinit
59 * @brief DeInitialize the SPI
60 * @return M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
61 */
62 sint8 nm_spi_deinit(void);
68 sint8 nm_spi_reset(void);
69 
77 uint32 nm_spi_read_reg(uint32 u32Addr);
78 
88 sint8 nm_spi_read_reg_with_ret(uint32 u32Addr, uint32* pu32RetVal);
89 
99 sint8 nm_spi_write_reg(uint32 u32Addr, uint32 u32Val);
100 
112 sint8 nm_spi_read_block(uint32 u32Addr, uint8 *puBuf, uint16 u16Sz);
113 
125 sint8 nm_spi_write_block(uint32 u32Addr, uint8 *puBuf, uint16 u16Sz);
126 
127 #ifdef __cplusplus
128  }
129 #endif
130 
131 #endif /* _NMSPI_H_ */
This module contains common APIs declarations.
sint8 nm_spi_init(void)
Initialize the SPI.
signed char sint8
Range of values between -128 to 127.
Definition: nm_bsp.h:123
sint8 nm_spi_reset(void)
reset the SPI
unsigned short uint16
Range of values between 0 to 65535.
Definition: ahdlc.cpp:46