drivers/hd44780: change default pin params

Remove the use of arduino dependent macros. The default pins are for the Arduino Zero board
This commit is contained in:
Alexandre Abadie 2019-10-22 16:42:02 +02:00
parent 8e70cfb2e4
commit bfe1a84991
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -26,6 +26,8 @@ extern "C"
{ {
#endif #endif
/* The default pins corresponds to Arduino pins on the Arduino Zero board. */
#ifndef HD44780_PARAM_COLS #ifndef HD44780_PARAM_COLS
#define HD44780_PARAM_COLS (16U) #define HD44780_PARAM_COLS (16U)
#endif #endif
@ -33,22 +35,22 @@ extern "C"
#define HD44780_PARAM_ROWS (2U) #define HD44780_PARAM_ROWS (2U)
#endif #endif
#ifndef HD44780_PARAM_PIN_RS #ifndef HD44780_PARAM_PIN_RS
#define HD44780_PARAM_PIN_RS ARDUINO_PIN_2 #define HD44780_PARAM_PIN_RS GPIO_PIN(0, 14) /* Arduino D2 */
#endif #endif
#ifndef HD44780_PARAM_PIN_RW #ifndef HD44780_PARAM_PIN_RW
#define HD44780_PARAM_PIN_RW GPIO_UNDEF #define HD44780_PARAM_PIN_RW GPIO_UNDEF
#endif #endif
#ifndef HD44780_PARAM_PIN_ENABLE #ifndef HD44780_PARAM_PIN_ENABLE
#define HD44780_PARAM_PIN_ENABLE ARDUINO_PIN_3 #define HD44780_PARAM_PIN_ENABLE GPIO_PIN(0, 9) /* Arduino D3 */
#endif #endif
#ifndef HD44780_PARAM_PINS_DATA #ifndef HD44780_PARAM_PINS_DATA
#define HD44780_PARAM_PINS_DATA { ARDUINO_PIN_4, \ #define HD44780_PARAM_PINS_DATA { GPIO_PIN(0, 8), /* Arduino D4 */ \
ARDUINO_PIN_5, \ GPIO_PIN(0, 15), /* Arduino D5 */ \
ARDUINO_PIN_6, \ GPIO_PIN(0, 20), /* Arduino D6 */ \
ARDUINO_PIN_7, \ GPIO_PIN(0, 21), /* Arduino D7 */ \
GPIO_UNDEF, \ GPIO_UNDEF, \
GPIO_UNDEF, \ GPIO_UNDEF, \
GPIO_UNDEF, \ GPIO_UNDEF, \
GPIO_UNDEF } GPIO_UNDEF }
#endif #endif