Пример #1
0
static void handle_cmd(handler_arg_t arg)
{
    switch ((char) (uint32_t) arg) {
        case 't':
            temperature_sensor();
            break;
        case 'l':
            light_sensor();
            break;
        case 'p':
            pressure_sensor();
            break;
        case 's':
            send_packet();
            break;
        case 'b':
            send_big_packet();
            break;
        case 'e':
            leds_action();
            break;
        case '\n':
            printf("\ncmd > ");
            break;
        case 'h':
        default:
            print_usage();
            break;
    }
}
Пример #2
0
static void handle_cmd(handler_arg_t arg)
{
    switch ((char) (uint32_t) arg) {
#ifdef IOTLAB_M3
    case 't':
        temperature_sensor();
        break;
    case 'l':
        light_sensor();
        break;
    case 'p':
        pressure_sensor();
        break;
#endif
    case 'u':
        print_node_uid();
        break;
    case 'd':
        print_cn_time();
        break;
    case 's':
        send_packet();
        break;
    case 'b':
        send_big_packet();
        break;
    case 'e':
        leds_action();
        break;
    case '\n':
        printf("\ncmd > ");
        break;
    case 'h':
    default:
        print_usage();
        break;
    }
}