- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am using cyw20706 on MudusBox SDK
I used memcmp to compare array and string
But, when I compare "AT+IOSSERIAL" and "AT+IOSTEAMID", memcmp return 0.
"AT+IOSSERIAL" and "AT+IOSTEAMID" are different.
why are you doing this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tested the hal_gpio demo about the API, there is no problem.
The code snip is as follows:
APPLICATION_START( )
{
char test1[] = { 'A', 'T', '+', 'I', 'O', 'S', 'S', 'E', 'R','I', 'A', 'L' };
char test2[] = { 'A', 'T', '+', 'I', 'O', 'S', 'T', 'E', 'A','M', 'I', 'D' };
uint8_t com_result;
wiced_set_debug_uart( WICED_ROUTE_DEBUG_TO_PUART );
wiced_hal_puart_select_uart_pads( WICED_PUART_RXD, WICED_PUART_TXD, 0, 0);
WICED_BT_TRACE( "GPIO application start\n\r" );
wiced_bt_stack_init( sample_gpio_app_management_cback,NULL,NULL);
if(memcmp(test2, test1, 12) == 0)
{
WICED_BT_TRACE("strings are same\n");
}
else
{
WICED_BT_TRACE("different strings\n");
}
}
And the log is :
GPIO application start
different strings
sample_gpio_app_management_cback 21
sample_gpio_app_management_cback 0
gpio_test_led
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tested the hal_gpio demo about the API, there is no problem.
The code snip is as follows:
APPLICATION_START( )
{
char test1[] = { 'A', 'T', '+', 'I', 'O', 'S', 'S', 'E', 'R','I', 'A', 'L' };
char test2[] = { 'A', 'T', '+', 'I', 'O', 'S', 'T', 'E', 'A','M', 'I', 'D' };
uint8_t com_result;
wiced_set_debug_uart( WICED_ROUTE_DEBUG_TO_PUART );
wiced_hal_puart_select_uart_pads( WICED_PUART_RXD, WICED_PUART_TXD, 0, 0);
WICED_BT_TRACE( "GPIO application start\n\r" );
wiced_bt_stack_init( sample_gpio_app_management_cback,NULL,NULL);
if(memcmp(test2, test1, 12) == 0)
{
WICED_BT_TRACE("strings are same\n");
}
else
{
WICED_BT_TRACE("different strings\n");
}
}
And the log is :
GPIO application start
different strings
sample_gpio_app_management_cback 21
sample_gpio_app_management_cback 0
gpio_test_led