#ifndef HOST_VERSION
/* now we want to do a printf : we must register the
- * uart0_send as stdout. Here no receive function is
+ * uart0_dev_send as stdout. Here no receive function is
* specified. */
fdevopen(uart0_dev_send, NULL);
#endif
uart_init();
- fdevopen((void *)uart0_send,NULL,0);
+ fdevopen((void *)uart0_dev_send, NULL,0);
printf_P(PSTR("\nbonjour\n"));
sei();
uart_init();
- fdevopen((void *)uart0_send,NULL,0);
+ fdevopen((void *)uart0_devsend, NULL,0);
printf_P(PSTR("\nbonjour\n"));
sei();
// init uart
uart_init();
- fdevopen(uart0_send,NULL, 0);
+ fdevopen(uart0_dev_send, NULL, 0);
// init uart
uart_init();
- fdevopen((void *)uart0_send,NULL,0);
+ fdevopen((void *)uart0_dev_send, NULL,0);
void
write_char(char c) {
- uart0_send(c);
+ uart_send(0, c);
}
#endif
#else
void
write_char(char c) {
- uart0_send(c);
+ uart_send(0, c);
}
static void
wait_ms(5000);
printf("Start\n");
- uart0_register_rx_event(rx);
+ uart_register_rx_event(0, rx);
sei();
#endif
u08 tab2[4];
#ifndef HOST_VERSION
-/* uart_init(); */
-/* fdevopen((int (*)(char))uart0_send,(int (*)(void))uart0_recv,0); */
+ uart_init();
+ fdevopen(uart0_dev_send, NULL, 0);
#endif
my_list_type my_list ;
my_another_list_type another_list ;
\r
tab[0] = 0;\r
\r
- uart0_send(c);\r
+ uart_send(0, c);\r
\r
if(c=='\r')\r
{\r
// kbd_register_event(menu_control);\r
\r
/* appele la fonction process a chaque reception de caractere */\r
- // uart0_register_rx_event(process);\r
+ // uart_register_rx_event(0, process);\r
\r
/* creation du device uart */\r
fdevopen(uart0_dev_send,uart0_dev_recv);\r
{\r
\r
/* wait_ms(1); */\r
-/* uart0_send(0x00); */\r
+/* uart_send(0, 0x00); */\r
/* wait_ms(1); */\r
-/* uart0_send(0x03); */\r
+/* uart_send(0, 0x03); */\r
/* wait_ms(1); */\r
-/* uart0_send(0xAA); */\r
+/* uart_send(0, 0xAA); */\r
/* wait_ms(1); */\r
-/* uart0_send(0x55); */\r
+/* uart_send(0, 0x55); */\r
/* wait_ms(1); */\r
-/* uart0_send(0xFF); */\r
+/* uart_send(0, 0xFF); */\r
/* wait_ms(1); */\r
/* wait_ms(1); */\r
printf("\r\n>> Time set to %d seconds\r\n",time_get_s());\r
*/
void action_servo_set(uint8_t num, uint16_t us)
{
- uart1_send(num);
- uart1_send(0x40 | (us&0x3F));
- uart1_send(0x80 | ((us>>6)&0x3F));
+ uart_send(1, num);
+ uart_send(1, 0x40 | (us&0x3F));
+ uart_send(1, 0x80 | ((us>>6)&0x3F));
}