Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

Anonymous
Not applicable

who can introduce sdk how to bootup,such as press power key ->bootloader->app.

0 Likes
1 Reply
SeyhanA_31
Employee

Hi,

Are you looking for detecting a GPIO state change that triggers the reboot?

Here is the sample code:

/*

* Copyright 2016, Broadcom Corporation

* All Rights Reserved.

*

* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;

* the contents of this file may not be disclosed to third parties, copied

* or duplicated in any form, in whole or in part, without the prior

* written permission of Broadcom Corporation.

*/

#include "wiced.h"

#include "wiced_framework.h"

void application_start( )

{

    /* Initialize the WICED device */

    wiced_init();

    WPRINT_APP_INFO( ( "Press WICED_BUTTON1 to reboot.\n" ) );

    while ( 1 )

    {

        if ( wiced_gpio_input_get( WICED_BUTTON1 ) == WICED_FALSE )

        {

            printf( "Rebooting...\n" );

            wiced_rtos_delay_milliseconds( 1000 );

            wiced_framework_reboot();

        }

        if ( wiced_gpio_input_get( WICED_BUTTON2 ) == WICED_FALSE )

        {

            WPRINT_APP_INFO( ( "WICED_BUTTON2 pressed.\n" ) );

        }

        wiced_rtos_delay_milliseconds( 250 );

    }

}

BR,

Seyhan