Permalink
Browse files

Try to highlight C block on github

  • Loading branch information...
1 parent 4a56466 commit 976a409844b3fa82b92187b63ada944f63095017 @stephane committed Sep 16, 2012
Showing with 22 additions and 22 deletions.
  1. +22 −22 README.md
View
@@ -20,28 +20,28 @@ Modbus functions are supported:
Example
-------
- ```c
- #include <Modbusino.h>
-
- /* Initialize the slave with the ID 1 */
- ModbusinoSlave modbusino_slave(1);
- /* Allocate a mapping of 10 values */
- uint16_t tab_reg[10];
-
- void setup() {
- /* The transfer speed is set to 115200 bauds */
- modbusino_slave.setup(115200);
- }
-
- void loop() {
- /* Initialize the first register to have a value to read */
- tab_reg[0] = 0x1234;
- /* Launch Modbus slave loop with:
- - pointer to the mapping
- - max values of mapping */
- modbusino_slave.loop(tab_reg, 10);
- }
- ```
+```c
+#include <Modbusino.h>
+
+/* Initialize the slave with the ID 1 */
+ModbusinoSlave modbusino_slave(1);
+/* Allocate a mapping of 10 values */
+uint16_t tab_reg[10];
+
+void setup() {
+ /* The transfer speed is set to 115200 bauds */
+ modbusino_slave.setup(115200);
+}
+
+void loop() {
+ /* Initialize the first register to have a value to read */
+ tab_reg[0] = 0x1234;
+ /* Launch Modbus slave loop with:
+ - pointer to the mapping
+ - max values of mapping */
+ modbusino_slave.loop(tab_reg, 10);
+}
+```
Contribute
----------

0 comments on commit 976a409

Please sign in to comment.