CuVoodoo STM32F1 firmware template
Macros | Functions
rs485.c File Reference

library for RS-485/RS-422 communication (code) More...

Go to the source code of this file.

Macros

#define RS485_USART   2
 USART peripheral.
 
#define RS485_RE_PORT   C
 RS-485 pin to enable receiver (active low, pulled up)
 
#define RS485_RE_PIN   13
 RS-485 pin to enable receiver (active low, pulled up)
 
#define RS485_DE_PORT   C
 RS-485 pin to enable driver (active high, pulled low)
 
#define RS485_DE_PIN   14
 RS-485 pin to enable driver (active high, pulled low)
 
#define RS485_BAUDRATE   1200
 serial baudrate, in bits per second (with 8N1 8 bits, no parity bit, 1 stop bit settings)
 

Functions

void rs485_setup (void)
 transmit and receive buffer sizes More...
 

Detailed Description

library for RS-485/RS-422 communication (code)

Author
King Kévin kingk.nosp@m.evin.nosp@m.@cuvo.nosp@m.odoo.nosp@m..info
Date
2017
Note
peripherals used: USART USART peripheral used for RS-485/RS-422 communication, GPIO GPIO pins used to control RS-485/RS-422 communication

Definition in file rs485.c.

Function Documentation

◆ rs485_setup()

void rs485_setup ( void  )

transmit and receive buffer sizes

how many bytes available in the received buffer since last read setup RS-485/RS-422 peripheral

Definition at line 65 of file rs485.c.