Sfoglia il codice sorgente

add wrapper function for write function to send data using the transport layer protocol

Fischer, Simon 3 anni fa
parent
commit
3fba861a17
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      src/shellmatta_transport.h

+ 5 - 0
src/shellmatta_transport.h

@@ -89,6 +89,7 @@ typedef struct
     bool mandatory;                         /**<  */
     bool active;                            /**<  */
     bool continueStep;                      /**<  */
+    shellmatta_write_t originalWrite;        /**<  */
 } shellmatta_transport_layer_t;
 
 extern uint8_t protocolVersion;
@@ -99,6 +100,8 @@ extern uint8_t destination;
 extern uint32_t crc32;
 extern uint8_t payloadCounter;
 extern uint8_t crcCounter;
+extern uint32_t packetSequenceCounter_h2s;
+extern uint32_t packetSequenceCounter_s2h;
 extern char payloadBuffer[SHELLMATTA_PAYLOAD_MAXLENGTH + 1];
 
 extern shellmatta_transport_layer_t transportLayerInst;
@@ -109,4 +112,6 @@ shellmatta_retCode_t shellmatta_init_transport_inst();
 
 shellmatta_retCode_t shellmatta_handle_transport_fsm(char *data);
 
+shellmatta_retCode_t shellmatta_write_transport(const char* data, uint32_t length);
+
 #endif /* _SHELLMATTA_TRANSPORT_H_ */