/** * main function * @return int return type required by ANSI/ISO standard. */ int main(void) { gpio_config(); //Initialize the LCD display if (!nrf6350_lcd_init()) { show_error(); } // Clear the display and print a welcome message if (!nrf6350_lcd_write_string(" RF TEST ", MAX_CHARACTERS_PER_LINE, LCD_UPPER_LINE, 0)) { show_error(); } if (!nrf6350_lcd_write_string(" SCROLL DOWN ", MAX_CHARACTERS_PER_LINE, LCD_LOWER_LINE, 0)) { show_error(); } // Init peripherals needed by radio radio_init(); wait_for_joystick_movement(); // so that the test title is visible on display until joystick status is changed menu_help_testrun_when_idle(); // This function will never return }
/**@brief Function for application main entry. */ int main(void) { gpio_config(); bool success = nrf6350_lcd_init(); APP_ERROR_CHECK_BOOL(success); success = nrf6350_lcd_write_string(" BLE ANCS ", MAX_CHARACTERS_PER_LINE, LCD_UPPER_LINE, 0); APP_ERROR_CHECK_BOOL(success); // Initialize. leds_init(); timers_init(); gpiote_init(); buttons_init(); ble_stack_init(); bond_manager_init(); gap_params_init(); service_add(); advertising_init(); conn_params_init(); sec_params_init(); radio_notification_init(); // Start execution. advertising_start(); // Enter main loop. for (;;) { power_manage(); } }
/**@brief Application main function. */ int main(void) { // Initialize leds_init(); timers_init(); buttons_init(); ble_stack_init(); gap_params_init(); services_init(); advertising_init(); conn_params_init(); sec_params_init(); nrf6350_lcd_init(); nrf6350_lcd_write_string("Ok a ", MAX_CHARACTERS_PER_LINE, LCD_UPPER_LINE, 0); advertising_start(); nrf6350_lcd_write_string("Ok b ", MAX_CHARACTERS_PER_LINE, LCD_UPPER_LINE, 0); // Enter main loop while(true) { power_manage(); } }