Example #1
0
static void server_loop(void) {
    int rc;

    chip_unipro_init();

    switch_set_local_dev_id(NULL, SWITCH_PORT_ID, LOCAL_DEV_ID);

    dbgprint("Wait for peer...\n");
    chip_reset_before_ready();

    rc = svc_wait_for_peer_ready();
    if (rc) {
        return;
    }

    switch_if_dev_id_set(NULL, PEER_PORT_ID, PEER_DEV_ID);

    create_connection(&conn[0]);
    dbgprint("Control port connected\n");

    gb_control();
    gbboot_process();
#ifdef _SIMULATION
    if (stage_to_load == FFFF_ELEMENT_STAGE_2_FW)
        chip_enter_hibern8_server();
#endif
}
Example #2
0
static void server_loop(void) {
    int rc;

    chip_unipro_init();

    switch_set_local_dev_id(NULL, SWITCH_PORT_ID, LOCAL_DEV_ID);

    dbgprint("Wait for peer...\n");
    chip_reset_before_ready();

    rc = svc_wait_for_peer_ready();
    if (rc) {
        return;
    }

#if _SPECIAL_TEST == SPECIAL_GEAR_CHANGE_TEST
    switch_gear_change(GEAR_HS_G1,
                       TERMINATION_ON,
                       HS_MODE_A,
                       2,
                       POWERMODE_FAST);
#endif

    switch_if_dev_id_set(NULL, PEER_PORT_ID, PEER_DEV_ID);

    create_connection(&conn[0]);
    dbgprint("Control port connected\n");

    gb_control();
    gbboot_process();
#if _SPECIAL_TEST == SPECIAL_GBBOOT_SERVER_STANDBY
    if (stage_to_load == FFFF_ELEMENT_STAGE_2_FW)
        chip_enter_hibern8_server();
#endif
}