/** * * @param file * @param ptr * @param len * @return */ int _write(int file, char * ptr, int len) { int r; for (r = 0; r < len; r++) { unsigned int ch = ptr[r]; #ifndef ENABLE_FRAMEBUFFER if (ch == '\n') bcm2835_uart_send('\r'); #endif #ifdef ENABLE_FRAMEBUFFER console_putc(ch); #else bcm2835_uart_send(ch); #endif } return len; }
int notmain(){ int start; int duration; bcm2835_uart_send('#'); bcm2835_uart_send('F'); bcm2835_uart_send(CHAR_SPACE); start = current_time_micros(); lcd_init(); duration = current_time_micros() - start; send_int_to_uart(duration); bcm2835_uart_send('#'); start = current_time_micros(); lcd_init_temps(); duration = current_time_micros() - start; send_int_to_uart(duration); bcm2835_uart_send('#'); start = current_time_micros(); lcd_update_temps(33, 59); duration = current_time_micros() - start; send_int_to_uart(duration); bcm2835_uart_send('#'); start = current_time_micros(); lcd_rotate(); duration = current_time_micros() - start; send_int_to_uart(duration); bcm2835_uart_send('#'); start = current_time_micros(); mcp3202_read_data(); duration = current_time_micros() - start; send_int_to_uart(duration); }