|
@@ -192,7 +192,7 @@ typedef struct shellmatta_cmd
|
|
struct shellmatta_cmd *next; /**< pointer to next command or NULL */
|
|
struct shellmatta_cmd *next; /**< pointer to next command or NULL */
|
|
} shellmatta_cmd_t;
|
|
} shellmatta_cmd_t;
|
|
|
|
|
|
-#ifdef SHELLMATTA_TRANSPORT_ENABLE
|
|
|
|
|
|
+#ifdef SHELLMATTA_TRANSPORT
|
|
|
|
|
|
/**
|
|
/**
|
|
* @brief definition of shellmatta transport layer states
|
|
* @brief definition of shellmatta transport layer states
|
|
@@ -252,9 +252,9 @@ typedef struct
|
|
bool mandatory; /**< is the transport layer enforced */
|
|
bool mandatory; /**< is the transport layer enforced */
|
|
uint8_t sequenceH2S; /**< sequence counter host to shellmatta */
|
|
uint8_t sequenceH2S; /**< sequence counter host to shellmatta */
|
|
uint8_t sequenceS2H; /**< sequenc counter shellmatta to host */
|
|
uint8_t sequenceS2H; /**< sequenc counter shellmatta to host */
|
|
- uint32_t headerIndex; /**< read indey of the header */
|
|
|
|
|
|
+ uint32_t headerIndex; /**< read index of the header */
|
|
uint32_t payloadIndex; /**< read index of the payload */
|
|
uint32_t payloadIndex; /**< read index of the payload */
|
|
- uint32_t crcIndex; /**< read index of the checmsum */
|
|
|
|
|
|
+ uint32_t crcIndex; /**< read index of the checksum */
|
|
shellmatta_transport_packet_t inPacket; /**< buffer for the received packets */
|
|
shellmatta_transport_packet_t inPacket; /**< buffer for the received packets */
|
|
shellmatta_transport_packet_t outPacket; /**< buffer for the sent packets */
|
|
shellmatta_transport_packet_t outPacket; /**< buffer for the sent packets */
|
|
shellmatta_write_t writeFct; /**< shellmatta write function */
|
|
shellmatta_write_t writeFct; /**< shellmatta write function */
|
|
@@ -316,7 +316,7 @@ typedef struct
|
|
shellmatta_auth_check_t checkFct; /**< custom credential check function */
|
|
shellmatta_auth_check_t checkFct; /**< custom credential check function */
|
|
shellmatta_auth_log_t logFct; /**< auth log function */
|
|
shellmatta_auth_log_t logFct; /**< auth log function */
|
|
#endif
|
|
#endif
|
|
-#ifdef SHELLMATTA_TRANSPORT_ENABLE
|
|
|
|
|
|
+#ifdef SHELLMATTA_TRANSPORT
|
|
uint32_t transportBusyMark; /**< transport processing position during
|
|
uint32_t transportBusyMark; /**< transport processing position during
|
|
busy cmd execution */
|
|
busy cmd execution */
|
|
shellmatta_transport_layer_t transportLayer; /**< transport layer instance */
|
|
shellmatta_transport_layer_t transportLayer; /**< transport layer instance */
|
|
@@ -326,7 +326,7 @@ typedef struct
|
|
/**
|
|
/**
|
|
* @brief helper macro for the send function
|
|
* @brief helper macro for the send function
|
|
*/
|
|
*/
|
|
-#ifdef SHELLMATTA_TRANSPORT_ENABLE
|
|
|
|
|
|
+#ifdef SHELLMATTA_TRANSPORT
|
|
#define SHELLMATTA_WRITE(data, length) inst->transportLayer.active == true ? \
|
|
#define SHELLMATTA_WRITE(data, length) inst->transportLayer.active == true ? \
|
|
shellmatta_transport_write((shellmatta_transport_layer_t*)&inst->transportLayer, (data), (length)) : \
|
|
shellmatta_transport_write((shellmatta_transport_layer_t*)&inst->transportLayer, (data), (length)) : \
|
|
inst->write((data), (length))
|
|
inst->write((data), (length))
|
|
@@ -382,16 +382,16 @@ shellmatta_retCode_t shellmatta_opt_long( shellmatta_handle_t handle,
|
|
char **argument,
|
|
char **argument,
|
|
uint32_t *argLen);
|
|
uint32_t *argLen);
|
|
|
|
|
|
-#ifdef SHELLMATTA_TRANSPORT_ENABLE
|
|
|
|
|
|
+#ifdef SHELLMATTA_TRANSPORT
|
|
|
|
|
|
shellmatta_retCode_t shellmatta_transport_configure(shellmatta_handle_t handle,
|
|
shellmatta_retCode_t shellmatta_transport_configure(shellmatta_handle_t handle,
|
|
bool mandatory,
|
|
bool mandatory,
|
|
bool disableAutoFlush,
|
|
bool disableAutoFlush,
|
|
shellmatta_transport_crc_t customCrcFct);
|
|
shellmatta_transport_crc_t customCrcFct);
|
|
|
|
|
|
-shellmatta_retCode_t shellmatta_transport_reset(shellmatta_handle_t handle);
|
|
|
|
|
|
+shellmatta_retCode_t shellmatta_transport_reset(shellmatta_handle_t handle);
|
|
|
|
|
|
-shellmatta_retCode_t shellmatta_transport_flush(shellmatta_handle_t handle);
|
|
|
|
|
|
+shellmatta_retCode_t shellmatta_transport_flush(shellmatta_handle_t handle);
|
|
|
|
|
|
#endif
|
|
#endif
|
|
|
|
|