keypad functional

started with external DAC implementation

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@224 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-09-29 09:13:48 +00:00
parent 888601f8cf
commit b56bc71f36
13 changed files with 206 additions and 70 deletions

View File

@@ -91,25 +91,25 @@
#define NHD0420_CMD_SHOW_RS232_BR (0x71)
#define NHD0420_CMD_SHOW_I2C_ADDRSS (0x72)
#define NHD0420_turnOnDisplay() NHD0420_sendCommand(NHD0420_CMD_DISPLAY_ON)
#define NHD0420_turnOffDisplay() NHD0420_sendCommand(NHD0420_CMD_DISPLAY_OFF)
#define NHD0420_turnOnDisplay(a) NHD0420_sendCommand(a, NHD0420_CMD_DISPLAY_ON)
#define NHD0420_turnOffDisplay(a) NHD0420_sendCommand(a, NHD0420_CMD_DISPLAY_OFF)
#define NHD0420_setCursorToHome() NHD0420_sendCommand(NHD0420_CMD_CURSOR_HOME)
#define NHD0420_setUnderlineCursorOn() NHD0420_sendCommand(NHD0420_CMD_CURSOR_UL_ON)
#define NHD0420_setUnderlineCursorOff() NHD0420_sendCommand(NHD0420_CMD_CURSOR_UL_OFF)
#define NHD0420_moveCursorToLeft() NHD0420_sendCommand(NHD0420_CMD_CURSOR_MV_LEFT)
#define NHD0420_moveCursorToRight() NHD0420_sendCommand(NHD0420_CMD_CURSOR_MV_RIGHT)
#define NHD0420_turnOnBlinkingCursor() NHD0420_sendCommand(NHD0420_CMD_CURSOR_BLK_ON)
#define NHD0420_turnOffBlinkingCursor() NHD0420_sendCommand(NHD0420_CMD_CURSOR_BLK_OFF)
#define NHD0420_useBackspace() NHD0420_sendCommand(NHD0420_CMD_CURSOR_BACKSPACE)
#define NHD0420_clearScreen() NHD0420_sendCommand(NHD0420_CMD_CLR_SCREEN)
#define NHD0420_setCursorToHome(a) NHD0420_sendCommand(a, NHD0420_CMD_CURSOR_HOME)
#define NHD0420_setUnderlineCursorOn(a) NHD0420_sendCommand(a, NHD0420_CMD_CURSOR_UL_ON)
#define NHD0420_setUnderlineCursorOff(a) NHD0420_sendCommand(a, NHD0420_CMD_CURSOR_UL_OFF)
#define NHD0420_moveCursorToLeft(a) NHD0420_sendCommand(a, NHD0420_CMD_CURSOR_MV_LEFT)
#define NHD0420_moveCursorToRight(a) NHD0420_sendCommand(a, NHD0420_CMD_CURSOR_MV_RIGHT)
#define NHD0420_turnOnBlinkingCursor(a) NHD0420_sendCommand(a, NHD0420_CMD_CURSOR_BLK_ON)
#define NHD0420_turnOffBlinkingCursor(a) NHD0420_sendCommand(a, NHD0420_CMD_CURSOR_BLK_OFF)
#define NHD0420_useBackspace(a) NHD0420_sendCommand(a, NHD0420_CMD_CURSOR_BACKSPACE)
#define NHD0420_clearScreen(a) NHD0420_sendCommand(a, NHD0420_CMD_CLR_SCREEN)
#define NHD0420_moveDisplayToLeft() NHD0420_sendCommand(NHD0420_CMD_MV_DISPLAY_LEFT)
#define NHD0420_moveDisplayToRight() NHD0420_sendCommand(NHD0420_CMD_MV_DISPLAY_RIGHT)
#define NHD0420_moveDisplayToLeft(a) NHD0420_sendCommand(a, NHD0420_CMD_MV_DISPLAY_LEFT)
#define NHD0420_moveDisplayToRight(a) NHD0420_sendCommand(a, NHD0420_CMD_MV_DISPLAY_RIGHT)
#define NHD0420_showFirmwareVersion() NHD0420_sendCommand(NHD0420_CMD_SHOW_VERSION)
#define NHD0420_showRS232Baudrate() NHD0420_sendCommand(NHD0420_CMD_SHOW_RS232_BR)
#define NHD0420_showI2CAddress() NHD0420_sendCommand(NHD0420_CMD_SHOW_I2C_ADDRSS)
#define NHD0420_showFirmwareVersion(a) NHD0420_sendCommand(a, NHD0420_CMD_SHOW_VERSION)
#define NHD0420_showRS232Baudrate(a) NHD0420_sendCommand(a, NHD0420_CMD_SHOW_RS232_BR)
#define NHD0420_showI2CAddress(a) NHD0420_sendCommand(a, NHD0420_CMD_SHOW_I2C_ADDRSS)
// -----------------------------------------------------------------------------
// Type definitions.
@@ -148,7 +148,7 @@ extern ErrorStatus NHD0420_construct(const struct IODevice* const device);
* @todo
* -----------------------------------------------------------------------------
*/
extern void NHD0420_destruct(void);
extern void NHD0420_destruct(const struct IODevice* self);
/** ----------------------------------------------------------------------------
@@ -178,7 +178,7 @@ extern ErrorStatus NHD0420_getSpiParameters(struct SpiParameters* parameters);
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus NHD0420_setCursorToPosition(char row, char column);
extern ErrorStatus NHD0420_setCursorToPosition(const struct IODevice* self, char row, char column);
/** ----------------------------------------------------------------------------
@@ -195,7 +195,7 @@ extern ErrorStatus NHD0420_setCursorToPosition(char row, char column);
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus NHD0420_setContrast(char contrast);
extern ErrorStatus NHD0420_setContrast(const struct IODevice* self, char contrast);
/** ----------------------------------------------------------------------------
@@ -212,7 +212,7 @@ extern ErrorStatus NHD0420_setContrast(char contrast);
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus NHD0420_setBacklightBrightness(char brightness);
extern ErrorStatus NHD0420_setBacklightBrightness(const struct IODevice* self, char brightness);
/** ----------------------------------------------------------------------------
@@ -237,7 +237,7 @@ extern ErrorStatus NHD0420_setBacklightBrightness(char brightness);
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus NHD0420_setRS232Baudrate(char baudrate);
extern ErrorStatus NHD0420_setRS232Baudrate(const struct IODevice* self, char baudrate);
/** ----------------------------------------------------------------------------
@@ -263,7 +263,7 @@ extern ErrorStatus NHD0420_setRS232Baudrate(char baudrate);
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus NHD0420_setI2CAddress(char address);
extern ErrorStatus NHD0420_setI2CAddress(const struct IODevice* self, char address);
/** ----------------------------------------------------------------------------
* NHD0420_SendCommand
@@ -277,8 +277,8 @@ extern ErrorStatus NHD0420_setI2CAddress(char address);
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus NHD0420_sendCommand(char command);
extern ErrorStatus NHD0420_sendCommand(const struct IODevice* self, char command);
extern ErrorStatus NHD0420_sendData(const char* buffer, size_t length);
extern ErrorStatus NHD0420_sendData(const struct IODevice* self, const char* buffer, size_t length);
#endif /* DISPLAY_INC_NHD0420_H_ */