|
IoT-MBBR (masterthesis)
Masterthesis upgrading a Moving Bed BioReactor with extra sensors and cloud connectivity.
|
serLCD functionality. More...
#include <stdint.h>#include <stdbool.h>Go to the source code of this file.
Functions | |
| int8_t | clearLCD (void) |
| Clear the LCD. More... | |
| int8_t | writeCharLCD (uint8_t data) |
| Write a character (one byte) to the LCD. More... | |
| int8_t | writeStringLCD (char *message) |
| Print a string (char array) to the LCD. More... | |
| int8_t | setCursorLCD (uint8_t col, uint8_t row) |
| Set the cursor to a specific location on the LCD. More... | |
| int8_t | heartBeatLCD (void) |
| Update the heartbeat icon. More... | |
serLCD functionality.
Copyright (C) 2020 - Brecht Van Eeckhoudt
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
A copy of the GNU General Public License can be found in the LICENSE file along with this source code.
Some methods use code obtained from examples from Silicon Labs' GitHub. These sections are licensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.
Code based on: https://github.com/sparkfun/SparkFun_SerLCD_Arduino_Library/blob/master/src/SerLCD.cpp
Definition in file serlcd.h.
| int8_t clearLCD | ( | void | ) |
Clear the LCD.
This method also initializes i2C if necessary.
0 - Byte written correctly. -1 - i2cTransferNack, NACK received during transfer. -2 - i2cTransferBusErr, Bus error during transfer (misplaced START/STOP). -3 - i2cTransferArbLost, Arbitration lost during transfer. -4 - i2cTransferUsageFault, Usage fault. -5 - i2cTransferSwFault, SW fault. -6 - Coudldn't configure I2C. Definition at line 168 of file serlcd.c.
| int8_t heartBeatLCD | ( | void | ) |
Update the heartbeat icon.
This method also initializes i2C if necessary.
0 - Byte written correctly. -1 - i2cTransferNack, NACK received during transfer. -2 - i2cTransferBusErr, Bus error during transfer (misplaced START/STOP). -3 - i2cTransferArbLost, Arbitration lost during transfer. -4 - i2cTransferUsageFault, Usage fault. -5 - i2cTransferSwFault, SW fault. -6 - Coudldn't configure I2C. Definition at line 361 of file serlcd.c.
Set the cursor to a specific location on the LCD.
This method also initializes i2C if necessary.
| [in] | col | Column (uint8_t, MAX = 20). |
| [in] | row | Row (uint8_t, MAX = 4). |
0 - Byte written correctly. -1 - i2cTransferNack, NACK received during transfer. -2 - i2cTransferBusErr, Bus error during transfer (misplaced START/STOP). -3 - i2cTransferArbLost, Arbitration lost during transfer. -4 - i2cTransferUsageFault, Usage fault. -5 - i2cTransferSwFault, SW fault. -6 - Coudldn't configure I2C. Definition at line 316 of file serlcd.c.
Write a character (one byte) to the LCD.
This method also initializes i2C if necessary.
| [in] | data | The data (uint8_t) to put on the I2C bus. |
0 - Byte written correctly. -1 - i2cTransferNack, NACK received during transfer. -2 - i2cTransferBusErr, Bus error during transfer (misplaced START/STOP). -3 - i2cTransferArbLost, Arbitration lost during transfer. -4 - i2cTransferUsageFault, Usage fault. -5 - i2cTransferSwFault, SW fault. -6 - Coudldn't configure I2C. Definition at line 214 of file serlcd.c.
| int8_t writeStringLCD | ( | char * | message | ) |
Print a string (char array) to the LCD.
"Hello world!") but a char array, the input message (array) needs to end with NULL ("\0")!This method also initializes i2C if necessary.
| [in] | message | The string to print to the LCD. |
0 - Byte written correctly. -1 - i2cTransferNack, NACK received during transfer. -2 - i2cTransferBusErr, Bus error during transfer (misplaced START/STOP). -3 - i2cTransferArbLost, Arbitration lost during transfer. -4 - i2cTransferUsageFault, Usage fault. -5 - i2cTransferSwFault, SW fault. -6 - Coudldn't configure I2C. Definition at line 264 of file serlcd.c.