예제 #1
0
파일: main.c 프로젝트: peredelkin/aecu
void mark_handler(void) {
    tooth_counter = 0;
    permit_tooth_counter = true;
    if (uart_tx_done(&uart0)) {
        sprintf(data, "Mark\n");
        uart_tx(&uart0, data, strlen(data));
    }
}
예제 #2
0
파일: main.c 프로젝트: peredelkin/aecu
void action_main_init(void) {
    coil_act_sorting_insert(&root, &coil14on);
    coil_act_sorting_insert(&root, &coil14off);
    coil_act_sorting_insert(&root, &coil23on);
    coil_act_sorting_insert(&root, &coil23off);
    while (!(uart_tx_done(&uart0)));
    sprintf(data, "Action inited\n");
    uart_tx(&uart0, data, strlen(data));
}
예제 #3
0
파일: main.c 프로젝트: peredelkin/aecu
void port_main_init(void) {
    pin_out(&b4);
    pin_out(&b5);
    pin_out(&b6);
    pin_out(&b7);
    pin_in_pu(&l1);
    while (!(uart_tx_done(&uart0)));
    sprintf(data, "Port inited\n");
    uart_tx(&uart0, data, strlen(data));
}
예제 #4
0
파일: main.c 프로젝트: peredelkin/aecu
void uart_main_init(uart_t* uart) {
    uart_init(uart);
    uart_baud_rate(uart, UART_UBRR_VALUE);
    uart_character_size(uart, 8);
    uart_parity_mode(uart, UPM_DIS);
    uart_stop_bit(uart, 1);
    while (!(uart_tx_done(uart)));
    sprintf(data, "Uart inited\n");
    uart_tx(uart, data, strlen(data));
}
예제 #5
0
파일: main.c 프로젝트: peredelkin/aecu
void stop_handler(void) {
    tooth_counter = 0;
    permit_tooth_counter = false;
    test_off();
    coil14_off();
    coil23_off();
    if (uart_tx_done(&uart0)) {
        sprintf(data, "Stop\n");
        uart_tx(&uart0, data, strlen(data));
    }
}
예제 #6
0
파일: main.c 프로젝트: peredelkin/aecu
void timer_main_init(void) {
    tmr16_set_cs(&tcs4); //action timer
    tmr16_set_cs(&tcs5); //capture timer
    tmr16_capture_setup(&cap5_pos_mask);
    tmr16_event_set(&cap5, capture_handler);
    tmr16_event_set(&cha5, tooth_59_handler);
    tmr16_event_set(&chb5, tooth_60_handler);
    tmr16_event_set(&chc5, mark_handler);
    tmr16_event_set(&ovf5, stop_handler);
    tmr16_int_enable(&cap5);
    tmr16_int_enable(&ovf5);
    while (!(uart_tx_done(&uart0)));
    sprintf(data, "Timer inited\n");
    uart_tx(&uart0, data, strlen(data));
}
예제 #7
0
파일: uart.c 프로젝트: MaxGekk/wiseos
void    tx_done_notify()
{
    uart_tx_done();
}