mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
AP_HAL_Linux: fixed LinuxGPIO_RPI::read()
This commit is contained in:
parent
49d3035ee5
commit
a55db1c25d
@ -62,7 +62,8 @@ int8_t LinuxGPIO_RPI::analogPinToDigitalPin(uint8_t pin)
|
|||||||
|
|
||||||
uint8_t LinuxGPIO_RPI::read(uint8_t pin)
|
uint8_t LinuxGPIO_RPI::read(uint8_t pin)
|
||||||
{
|
{
|
||||||
return GPIO_GET(pin);
|
uint32_t value = GPIO_GET(pin);
|
||||||
|
return value ? 1: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinuxGPIO_RPI::write(uint8_t pin, uint8_t value)
|
void LinuxGPIO_RPI::write(uint8_t pin, uint8_t value)
|
||||||
|
Loading…
Reference in New Issue
Block a user