NetBurner 3.1
wifiBsp.h
Go to the documentation of this file.
1 /*NB_REVISION*/
2 
3 /*NB_COPYRIGHT*/
4 
9 #ifndef __NBWIFIBSP_H
10 #define __NBWIFIBSP_H
11 
12 #include <wifi/wifiDriver.h>
13 
14 #define SPI_DEFAULT_BAUD 10000000 // 10 MHz
15 #define SPI_DEFAULT_WILC_BAUD 40000000 // 40 MHz
16 
17 namespace NB {
18 namespace WifiBSP {
19 
20 enum GPIO_Slave_Select {
21  ASSERT_SLAVE_SELECT = 0x0,
22  DEASSERT_SLAVE_SELECT = 0x1,
23 };
24 
25 void SetupIOPins( int spiModuleNum, int csSpiNum, int connectorNum, int csGpioPinNum, int resetPinNum);
26 
27 void InitSPI( int moduleNum, int csNum , uint32_t busSpeed = SPI_DEFAULT_BAUD);
28 
29 void StartSPI( int moduleNum, uint8_t *TxBuffer, uint8_t *RxBuffer, uint32_t len, OS_SEM *SPI_SEM, bool keepCsAsserted );
30 
31 void SetPin( int header, int pinNum, int state );
32 
33 void InitIRQFunc( int IRQNum, void (*handler)( void ), wifiModule wifiPlatform);
34 
35 void ResetIRQ( int IRQNum );
36 
37 void DisableIRQ( int IRQNum );
38 
39 void WifiReset( int resetPinNum = -1, int connectorNum = -1, int chipEnablePinNum = -1);
40 
41 }
42 }
43 
44 #endif /* ----- #ifndef __NBWIFIBSP_H ----- */
Semaphores are used to control access to shared resource critical section, or to communicate between ...
Definition: nbrtos.h:318
Definition: dhcpv6_internal.h:34
NetBurner Wifi API.