Skip to content
Commit 61372551 authored by Dmitriy Linikov's avatar Dmitriy Linikov Committed by Gregory Nutt
Browse files

Merged in hardlulz/modem-3.0-nuttx/fix-stmpe811-gpio (pull request #523)



Fix GPIO operation of STMPE811 driver.

Fixed issues:
1. STMPE811_GPIO_DIR was defined for register name
   and later was redefined to be the pin direction mask
   for `stmpe811_gpioconfig`

   I decided to change register name to be STMPE811_GPIO_DIR_REG,
   and keep pin direction mask STMPE811_GPIO_DIR, so that any
   external code that already use this driver will be unchanged.

2. The STMPE811 register GPIO_DIR uses bit value 1 for output
   and 0 for input, but `stmpe811_gpioconfig` set the opposite.

3. The call to `stmpe811_gpiowrite` from inside of `stmpe811_gpioconfig`
   leaded to deadlock.

Approved-by: default avatarGregory Nutt <gnutt@nuttx.org>
parent 09d48745
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment