Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of 2-ComfileHMI_Modbus by
main.cpp@3:f234e151b888, 2016-09-09 (annotated)
- Committer:
- hyx2001
- Date:
- Fri Sep 09 04:35:36 2016 +0000
- Revision:
- 3:f234e151b888
- Parent:
- 2:f0fc57045b3d
- Child:
- 4:217cca9f2592
test
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| 4180_1 | 0:023c5cda6102 | 1 | |
| 4180_1 | 0:023c5cda6102 | 2 | #include "mbed.h" |
| hyx2001 | 2:f0fc57045b3d | 3 | #include "SimpleModbus.h" |
| 4180_1 | 0:023c5cda6102 | 4 | |
| hyx2001 | 2:f0fc57045b3d | 5 | static u8 MDcoil[100]={0,0,0,}; |
| hyx2001 | 2:f0fc57045b3d | 6 | static u16 MDregister[100]={100,200,300,400,}; |
| 4180_1 | 0:023c5cda6102 | 7 | |
| 4180_1 | 0:023c5cda6102 | 8 | int main() { |
| hyx2001 | 2:f0fc57045b3d | 9 | StartModbus(PC_10, PC_11, 115200, 1, MDregister, MDcoil); |
| 4180_1 | 0:023c5cda6102 | 10 | |
| 4180_1 | 0:023c5cda6102 | 11 | while (1) { |
| hyx2001 | 2:f0fc57045b3d | 12 | wait_ms(300); |
| hyx2001 | 3:f234e151b888 | 13 | MDregister[0]; |
| hyx2001 | 3:f234e151b888 | 14 | MDregister[1]; |
| hyx2001 | 3:f234e151b888 | 15 | MDregister[2]; |
| hyx2001 | 3:f234e151b888 | 16 | MDregister[3]; |
| 4180_1 | 0:023c5cda6102 | 17 | } |
| 4180_1 | 0:023c5cda6102 | 18 | } |
| 4180_1 | 0:023c5cda6102 | 19 |
