这篇教程C++ wiced_assert函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wiced_assert函数的典型用法代码示例。如果您正苦于以下问题:C++ wiced_assert函数的具体用法?C++ wiced_assert怎么用?C++ wiced_assert使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wiced_assert函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: wwd_wifi_set_ampdu_parameters/** Sets the chip specific AMPDU parameters for AP and STA * For SDK 3.0, and beyond, each chip will need it's own function for setting AMPDU parameters. */wwd_result_t wwd_wifi_set_ampdu_parameters( void ){ wiced_buffer_t buffer; wwd_result_t retval; /* Set AMPDU Block ACK window size */ uint32_t* data = (uint32_t*) wwd_sdpcm_get_iovar_buffer( &buffer, (uint16_t) 4, IOVAR_STR_AMPDU_BA_WINDOW_SIZE ); CHECK_IOCTL_BUFFER( data ); *data = (uint32_t) 8; retval = wwd_sdpcm_send_iovar( SDPCM_SET, buffer, NULL, WWD_STA_INTERFACE ); wiced_assert("set_ampdu_parameters: Failed to set block ack window size/r/n", retval == WWD_SUCCESS ); /* Set number of MPDUs available for AMPDU */ data = (uint32_t*) wwd_sdpcm_get_iovar_buffer( &buffer, (uint16_t) 4, IOVAR_STR_AMPDU_MPDU ); CHECK_IOCTL_BUFFER( data ); *data = (uint32_t) 4; retval = wwd_sdpcm_send_iovar( SDPCM_SET, buffer, NULL, WWD_STA_INTERFACE ); wiced_assert("set_ampdu_parameters: Failed to set number of MPDUs/r/n", retval == WWD_SUCCESS ); /* Set size of advertised receive AMPDU */ data = (uint32_t*) wwd_sdpcm_get_iovar_buffer( &buffer, (uint16_t) 4, IOVAR_STR_AMPDU_RX_FACTOR ); CHECK_IOCTL_BUFFER( data ); *data = (uint32_t) AMPDU_RX_FACTOR_8K; retval = wwd_sdpcm_send_iovar( SDPCM_SET, buffer, NULL, WWD_STA_INTERFACE ); wiced_assert("set_ampdu_parameters: Failed to set advertised receive AMPDU size/r/n", retval == WWD_SUCCESS ); return retval;}
开发者ID:fishbaoz,项目名称:wiced-emw3165,代码行数:34,
示例2: reset_rtc_valuesstatic void reset_rtc_values( void ){ ErrorStatus status; /* Disable write protection of rtc registers */ RTC_WriteProtectionCmd(DISABLE); status = RTC_EnterInitMode(); REFERENCE_DEBUG_ONLY_VARIABLE(status); wiced_assert( "Rtc can not enter intialisation mode", status==SUCCESS ); /* Reset calendar date registers */ RTC->TR = 0; RTC_ExitInitMode(); status = RTC_WaitForSynchro(); wiced_assert( "Rtc can not synchronize", status==SUCCESS ); /* Enable write protection of rtc registers */ RTC_WriteProtectionCmd(ENABLE); /* Disable write protection of the rtc registers */ RTC_WriteProtectionCmd(DISABLE); status = RTC_EnterInitMode(); wiced_assert( "Rtc can not enter intialisation mode", status==SUCCESS ); /* 2000 year 01/01 */ RTC->DR= 0; RTC->DR= ( 1<<13 ) | ( 1<<8 ) | ( 1<<0 ); RTC_ExitInitMode(); status = RTC_WaitForSynchro(); wiced_assert( "Rtc can not synchronize", status==SUCCESS ); /* Enable write protection of rtc registers */ RTC_WriteProtectionCmd(ENABLE);}
开发者ID:119,项目名称:bcm-wiced-sdk,代码行数:35,
示例3: convert_rtc_calendar_values_to_units_passedstatic uint32_t convert_rtc_calendar_values_to_units_passed( void ){ long int temp1=0; long int temp2=0; int temp=0; long int temp_days=0; uint8_t current_year; RTC_TimeTypeDef rtc_read_time; RTC_DateTypeDef rtc_read_date; /* Read current rtc time */ RTC_GetTime( RTC_Format_BIN, &rtc_read_time ); RTC_GetDate( RTC_Format_BIN, &rtc_read_date ); /* Calculate number of days in the previous years */ if( rtc_read_date.RTC_Year != 0 ) { for( temp = (int)( rtc_read_date.RTC_Year - 1 ); temp >= 0; temp-- ) { temp_days += (LEAP_YEAR_OR_NOT(temp)) ? (LEAP_YEAR_DAY_COUNT): (NOT_LEAP_YEAR_DAY_COUNT); } } current_year = rtc_read_date.RTC_Year; wiced_assert("Inappropriate month value in RTC", (rtc_read_date.RTC_Month != 0) ); if( rtc_read_date.RTC_Month != 0 ) { /* Calculate number of days passed in the current year and add them to previous days value */ for( temp = (int)( rtc_read_date.RTC_Month - 1 ); temp > 0; temp-- ) { temp_days += LEAP_YEAR_OR_NOT(current_year)?(leap_days[temp]):(not_leap_days[temp]); } } /* Convert passed hours, seconds and minutes to seconds */ temp1 = rtc_read_time.RTC_Seconds + rtc_read_time.RTC_Minutes*NUM_SECONDS_IN_MINUTE + rtc_read_time.RTC_Hours*NUM_SECONDS_IN_HOUR; wiced_assert("Inappropriate date value in RTC", ( rtc_read_date.RTC_Date != 0 ) ); /* Convert passed days to seconds */ if( rtc_read_date.RTC_Date != 0 ) { temp2 = ( ( rtc_read_date.RTC_Date - 1 ) + temp_days ) * NUM_SECONDS_IN_HOUR * 24; } /* Return total number of seconds passed */ return (uint32_t)( temp1 + temp2 );}
开发者ID:119,项目名称:bcm-wiced-sdk,代码行数:50,
示例4: send_charstatic void send_char( char c ){ wiced_result_t result; result = wiced_uart_transmit_bytes( cons.uart, &c, 1 ); wiced_assert("", result == WICED_SUCCESS); REFERENCE_DEBUG_ONLY_VARIABLE( result );}
开发者ID:fishbaoz,项目名称:wiced-emw3165,代码行数:7,
示例5: wiced_tls_receive_packetwiced_result_t wiced_tls_receive_packet( wiced_tcp_socket_t* socket, wiced_packet_t** packet, uint32_t timeout ){ wiced_result_t result; wiced_tls_context_t* context = &socket->tls_context->context; /* Check if we already have a record which should only happen if it was larger than a packet which means it's stored in the defragmentation buffer */ if ( context->current_record != NULL ) { wiced_assert( "Something wrong", (void*)context->current_record == context->defragmentation_buffer ); return tls_packetize_buffered_data( context, packet ); } else { tls_record_t* record; result = tls_get_next_record( context, &record, timeout, TLS_RECEIVE_PACKET_IF_NEEDED ); if ( result != WICED_SUCCESS ) { return result; } /* Check if this record has been defragmented */ if ( (void*)record == context->defragmentation_buffer ) { return tls_packetize_buffered_data( context, packet ); } else { tls_record_t* temp_record; uint8_t* packet_data; uint16_t length; uint16_t available; uint8_t* end_of_data; /* We have a pointer to the current record so we can move on */ tls_skip_current_record(context); /* Make sure we process every record in this packet */ end_of_data = record->message + htobe16( record->length ); while ( tls_get_next_record( context, &temp_record, timeout, TLS_AVOID_NEW_RECORD_PACKET_RECEIVE ) == TLS_SUCCESS ) { /* Make the record data contiguous with the previous record */ uint16_t temp_record_length = htobe16( temp_record->length ); end_of_data = MEMCAT( end_of_data, temp_record->message, temp_record_length ); record->length = htobe16( htobe16(record->length) + temp_record_length ); tls_skip_current_record( context ); } /* Set the packet start and end */ wiced_packet_get_data( (wiced_packet_t*)context->received_packet, 0, &packet_data, &length, &available ); tls_host_set_packet_start( context->received_packet, record->message ); wiced_packet_set_data_end( (wiced_packet_t*)context->received_packet, end_of_data ); *packet = (wiced_packet_t*)context->received_packet; context->received_packet = NULL; context->received_packet_length = 0; } } return WICED_SUCCESS;}
开发者ID:119,项目名称:bcm-wiced-sdk,代码行数:60,
示例6: main/** * Main function - starts ThreadX * Called from the crt0 _start function * */int main( void ){#if defined ( __IAR_SYSTEMS_ICC__ )/* IAR allows init functions in __low_level_init(), but it is run before global * variables have been initialised, so the following init still needs to be done * When using GCC, this is done in crt0_GCC.c */ init_architecture( ); init_platform( );#endif /* #elif defined ( __IAR_SYSTEMS_ICC__ ) */#ifndef WICED_DISABLE_WATCHDOG /* Start the watchdog kicking thread */ xTaskCreate( system_monitor_thread_main, (signed char*)"system monitor", SYSTEM_MONITOR_THREAD_STACK_SIZE/sizeof( portSTACK_TYPE ), NULL, RTOS_HIGHEST_PRIORITY, &system_monitor_thread_handle);#endif /* WICED_DISABLE_WATCHDOG */ /* Create an initial thread */ xTaskCreate( application_thread_main, (signed char*)"app_thread", APPLICATION_STACK_SIZE/sizeof( portSTACK_TYPE ), NULL, WICED_PRIORITY_TO_NATIVE_PRIORITY(WICED_APPLICATION_PRIORITY), &app_thread_handle);#ifdef __GNUC__ { wiced_result_t result; result = wiced_freertos_init_malloc_mutex(); wiced_assert( "Unable t create a freertos malloc mutex", result == WICED_SUCCESS ); (void) result; }#endif /* ifdef __GNUC__ */ /* Start the FreeRTOS scheduler - this call should never return */ vTaskStartScheduler( ); /* Should never get here, unless there is an error in vTaskStartScheduler */ return 0;}
开发者ID:fishbaoz,项目名称:wiced-emw3165,代码行数:39,
示例7: wwd_thread_send_one_packet/** Sends the first queued packet * * Checks the queue to determine if there is any packets waiting * to be sent. If there are, then it sends the first one. * * This function is normally used by the WWD Thread, but can be * called periodically by systems which have no RTOS to ensure * packets get sent. * * @return 1 : packet was sent * 0 : no packet sent */int8_t wwd_thread_send_one_packet( void ) /*@modifies internalState @*/{ wiced_buffer_t tmp_buf_hnd = NULL; wwd_result_t result; if ( wwd_sdpcm_get_packet_to_send( &tmp_buf_hnd ) != WWD_SUCCESS ) { /*@[email C++ wide_string_to_UTF8函数代码示例 C++ wi_string_with_format函数代码示例
|