increase digitalWrite() value parameter width to 16 bit
- this useful for the 16 bit parallel TFT lib
This commit is contained in:
parent
fbd6927d56
commit
b8afde026a
|
@ -59,7 +59,7 @@ static inline afio_exti_port gpio_exti_port(const gpio_dev *dev) {
|
||||||
* @param pin Pin on to set or reset
|
* @param pin Pin on to set or reset
|
||||||
* @param val If true, set the pin. If false, reset the pin.
|
* @param val If true, set the pin. If false, reset the pin.
|
||||||
*/
|
*/
|
||||||
static inline void gpio_write_pin(uint8_t pin, uint8 val) {
|
static inline void gpio_write_pin(uint8_t pin, uint16 val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
(PIN_MAP[pin].gpio_device)->regs->BSRRL = BIT(pin&0x0F);
|
(PIN_MAP[pin].gpio_device)->regs->BSRRL = BIT(pin&0x0F);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -94,7 +94,7 @@ uint32 digitalRead(uint8 pin)
|
||||||
HIGH : LOW;
|
HIGH : LOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
void digitalWrite(uint8 pin, uint8 val)
|
void digitalWrite(uint8 pin, uint16 val)
|
||||||
{
|
{
|
||||||
if (pin >= BOARD_NR_GPIO_PINS) {
|
if (pin >= BOARD_NR_GPIO_PINS) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue