April_12th_San_Jose_LoRa_Bootcamp
Fork of LoRaWAN-grove-cayenne by
SerialDisplay.h
00001 /* 00002 / _____) _ | | 00003 ( (____ _____ ____ _| |_ _____ ____| |__ 00004 \____ \| ___ | (_ _) ___ |/ ___) _ \ 00005 _____) ) ____| | | || |_| ____( (___| | | | 00006 (______/|_____)_|_|_| \__)_____)\____)_| |_| 00007 (C)2015 Semtech 00008 00009 Description: VT100 serial display management 00010 00011 License: Revised BSD License, see LICENSE.TXT file include in the project 00012 00013 Maintainer: Miguel Luis and Gregory Cristian 00014 */ 00015 #ifndef __SERIAL_DISPLAY_H__ 00016 #define __SERIAL_DISPLAY_H__ 00017 00018 #include "vt100.h" 00019 #include "LoRaMac1v1.h" 00020 00021 #ifdef ENABLE_VT100 00022 00023 #define ROW_START 5 00024 #ifdef LORAWAN_JOIN_EUI 00025 #define ROW_DEVEUI ROW_START 00026 #define ROW_JOINEUI (ROW_DEVEUI+1) 00027 #define ROW_NWKKEY (ROW_JOINEUI+1) 00028 #ifdef OPTNEG 00029 #define ROW_APPKEY (ROW_JOINEUI+2) 00030 #define ROW_NwkId (ROW_JOINEUI+5) 00031 #else 00032 #define ROW_NwkId (ROW_JOINEUI+4) 00033 #endif 00034 #else 00035 #define ROW_NwkId ROW_START /* ABP */ 00036 #endif /* LORAWAN_JOIN_EUI */ 00037 00038 #define ROW_DevAddr (ROW_NwkId+1) 00039 #define ROW_FNwkSIntKey (ROW_NwkId+2) 00040 #ifdef OPTNEG 00041 #define ROW_SNwkSIntKey (ROW_NwkId+3) 00042 #define ROW_NwkSEncKey (ROW_NwkId+4) 00043 #define ROW_AppSKey (ROW_NwkId+5) 00044 #else 00045 #define ROW_AppSKey (ROW_NwkId+3) 00046 #endif 00047 00048 #define ROW_FrameType (ROW_AppSKey+2) 00049 #define ROW_ADR (ROW_AppSKey+3) 00050 #define ROW_DUTY (ROW_AppSKey+4) 00051 #define ROW_PUBLIC (ROW_AppSKey+6) 00052 #ifdef LORAWAN_JOIN_EUI 00053 #define ROW_JOINED (ROW_PUBLIC+1) 00054 #define ROW_UPLINK_ACKED (ROW_PUBLIC+3) 00055 #else 00056 #define ROW_UPLINK_ACKED (ROW_PUBLIC+2) 00057 #endif /* LORAWAN_JOIN_EUI */ 00058 00059 #define ROW_UPLINK_DR (ROW_UPLINK_ACKED+1) 00060 #define ROW_UPLINK_FCNT (ROW_UPLINK_DR+1) 00061 #define ROW_UPLINK_PORT (ROW_UPLINK_DR+2) 00062 #define ROW_UPLINK_PAYLOAD (ROW_UPLINK_DR+3) 00063 00064 #define ROW_DOWNLINK_RSSI (ROW_UPLINK_PAYLOAD+5) 00065 #define ROW_DOWNLINK_SNR (ROW_DOWNLINK_RSSI+1) 00066 #define ROW_DOWNLINK_FCNT (ROW_DOWNLINK_SNR+1) 00067 #define ROW_DOWNLINK_FPORT (ROW_DOWNLINK_FCNT+1) 00068 #define ROW_DOWNLINK_PAYLOAD (ROW_DOWNLINK_FPORT+1) 00069 00070 #define ROW_END (ROW_DOWNLINK_PAYLOAD+6) 00071 00072 void SerialDisplayInit( void ); 00073 void SerialDisplayUplink(uint8_t fport, const uint8_t* buffer, uint8_t bufferSize ); 00074 void SerialDisplayMcpsConfirm( const McpsConfirm_t*); 00075 void SerialDisplayMcpsIndication(const McpsIndication_t* mi); 00076 void SerialDisplayPrintCheckBox( bool activated ); 00077 #ifdef LORAWAN_JOIN_EUI 00078 void SerialDisplayUpdateActivationMode( bool otaa ); 00079 void SerialDisplayUpdateEui( uint8_t line, const uint8_t *eui ); 00080 void SerialDisplayUpdateNetworkIsJoined( bool state ); 00081 #endif /* LORAWAN_JOIN_EUI */ 00082 void SerialDisplayUpdateKey( uint8_t line, const uint8_t *key ); 00083 void SerialDisplayUpdateNwkId( uint8_t id ); 00084 void SerialDisplayUpdateDevAddr( uint32_t addr ); 00085 void SerialDisplayUpdateFrameType( bool confirmed ); 00086 void SerialDisplayUpdateAdr( bool adr ); 00087 void SerialDisplayUpdateDutyCycle( bool dutyCycle ); 00088 void SerialDisplayUpdatePublicNetwork( bool network ); 00089 void SerialDisplayUpdateData( const uint8_t *buffer ); 00090 void SerialDisplayUpdateUplinkAcked( bool state ); 00091 void SerialDisplayUpdateDonwlinkRxData( bool state ); 00092 bool SerialDisplayReadable( void ); 00093 uint8_t SerialDisplayGetChar( void ); 00094 extern VT100 vt; 00095 #endif /* ENABLE_VT100 */ 00096 00097 #endif // __SERIAL_DISPLAY_H__
Generated on Sat Jul 16 2022 03:38:23 by
![doxygen](doxygen.png)