NetBurner 3.0
nbWicedSerial.h
Go to the documentation of this file.
1 /*NB_REVISION*/
2 
3 /*NB_COPYRIGHT*/
4 
9 #ifndef __NBWICEDSERIAL_H
10 #define __NBWICEDSERIAL_H
11 
12 #include <buffers.h>
13 #include <nettypes.h>
14 #include <netinterface.h>
15 #include <constants.h>
16 #include <utils.h>
17 #include <nbwifi/nbWifiDriver.h>
19 
20 namespace NBWifi {
21 namespace Broadcom {
22 
23  class SerialMaster : public WICED
24  {
25  int fd_serial;
26  int portNum;
27  uint32_t baudRate;
28  uint32_t rxCount, txCount;
29  int SyncSerialStream( int syncRemaining );
30 
31  void RXTask() override;
32 
33  // all return the amount of additional space used in the rxBuffer
34  int ReadMessage( PoolPtr pp, uint16_t messageLength, bool overwrite = false );
35 
36  virtual void SendBusMessage_Core(
37  PoolPtr txMessage
38  ) override;
39  virtual void TransmitBuffer_Core( PoolPtr txBuffer, uint8_t credits ) override;
40 
41  friend class Master;
42  friend class WICED;
43 
44  public:
45 
46  /* InterfaceBlock virtual functions */
47  void send_func( PoolPtr poolPtr ) override;
48  void kill_if() override;
49  void EnableMulticast( MACADR macAddress, BOOL addAddress ) override;
50  bool LinkActive() override;
51  int LinkSpeed() override;
52  bool LinkDuplex() override;
53  const char* GetInterfaceName() override;
54 
55  void SendCreditRequest() override;
56  void SendCreditReport( uint8_t credits = 0xFF) override;
57  virtual bool SetBusSpeed( uint32_t busSpeed ) override;
58  SerialMaster( int portNum, int resetPinNum, const char * name);
59  };
60 } /* ----- end of namespace NBWifi ----- */
61 } /* ----- end of namespace Broadcom ----- */
62 
63 #endif /* ----- #ifndef __NBWICEDSERIAL_H ----- */
NetBurner Wifi API.
NetBurner System Constants.
NBWifi namespace that encompaces the WiFi driver.
Definition: nbWifiBsp.h:15
NetBurner Buffers API.