Esempio n. 1
0
File: network.c Progetto: ADTL/TinyG
void tg_receiver()
{
//	tg_controller();	// this node executes gcode blocks received via RS485

//	int	getc_code = 0;
	int rx;

	xio_queue_RX_string_usart(XIO_DEV_RS485, "Z");		// simulate an RX char

	while (true) {
		while ((rx = xio_getc(XIO_DEV_RS485)) == -1);
		xio_putc(XIO_DEV_RS485, rx);	// write to RS485 port
//		xio_putc_rs485(rx, fdev_rs485);	// alternate form of above
//		gpio_toggle_port(1);
	}
}
Esempio n. 2
0
void xio_queue_RX_string_rs485(const char *buf) {xio_queue_RX_string_usart(XIO_DEV_RS485, buf);}