SNIC UART Interface library: Serial to Wi-Fi library for Murata TypeYD Wi-Fi module. For more information about TypeYD: http://www.murata.co.jp/products/microwave/module/lbwb1zzydz/index.html
Dependents: SNIC-xively-jumpstart-demo SNIC-FluentLogger-example TCPEchoServer murataDemo ... more
Fork of YDwifiInterface 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;
muRata

Murata TypeYD