Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: SNIC-httpclient-example SNIC-ntpclient-example
Fork of SNICInterface by
Diff: SNICwifi/SNICwifi.cpp
- Revision:
- 10:49ffd373066b
- Parent:
- 9:a98b45e766c8
--- a/SNICwifi/SNICwifi.cpp Tue Mar 18 01:13:52 2014 +0000
+++ b/SNICwifi/SNICwifi.cpp Tue Mar 18 02:57:24 2014 +0000
@@ -45,6 +45,27 @@
return 0;
}
+unsigned int C_SNICwifi::preparationSendCommand( unsigned char cmd_id, unsigned char cmd_sid
+ , unsigned char *req_buf_p, unsigned int req_buf_len
+ , unsigned char *response_buf_p, unsigned char *command_p )
+{
+ unsigned char payload_array[UART_REQUEST_PAYLOAD_MAX];
+ unsigned short payload_len;
+ unsigned int command_len = 0;
+
+ // Make command payload
+ payload_len = C_SNIC_UartMsg::makePayload( req_buf_len, req_buf_p, payload_array );
+ // Make all command request
+ command_len = C_SNIC_UartMsg::makeRequest( cmd_id, payload_array, payload_len, command_p );
+
+ // Set data for response
+ mUartCommand.setCommandID( cmd_id );
+ mUartCommand.setCommandSID( cmd_sid );
+ mUartCommand.setResponseBuf( response_buf_p );
+
+ return command_len;
+}
+
int C_SNICwifi::sendUart( unsigned int len, unsigned char *data )
{
int ret = 0;
