This is a RS485 class that uses the second UART and was tested on a Nucleo F030R8. A main demo program howto use the class is included. This class control the direction pin on the transceiver buffer automatically, and used transmit and receive interrupts. Ring buffers (256 bytes) are implemented on both transmission and reception. It assumes a ADM3485 'type' buffer where pins 2 ans 3 are connected and seen as direction. This test program could easily be adapted as base for other programs.
Revisions of main.cpp
Revision | Date | Message | Actions |
---|---|---|---|
6:70460dcbc43c | 2014-11-11 | Add display of the rs485 direction, seem to work | File Diff Annotate |
5:e00f46d18514 | 2014-11-11 | Rx interrupts seem to work fine, tested with 37 chars | File Diff Annotate |
4:2945afce4322 | 2014-11-11 | This version interrupts on receive seem to work | File Diff Annotate |
3:29454cac7930 | 2014-11-11 | Commit just before attach re put back | File Diff Annotate |
2:c99c596be3d1 | 2014-11-11 | Fix the 115200 baudrate, top bit most of the time set (baudrate to high) | File Diff Annotate |
1:7091401482c5 | 2014-11-11 | The led flash, the command line receive not dapper, but 1111 set the flag | File Diff Annotate |
0:044dfba47660 | 2014-11-11 | Flashing led | File Diff Annotate |