nrf5/hal: Fixing bug in mp_hal_pin_read in mphalport.h which tried to read an OUT register. Corrected to read the IN register.
This commit is contained in:
parent
7b6bdc4c2b
commit
c34127e754
|
@ -125,7 +125,7 @@ void mp_hal_stdout_tx_str(const char *str);
|
|||
#define mp_hal_pin_obj_t const pin_obj_t*
|
||||
#define mp_hal_pin_high(p) (((NRF_GPIO_Type *)((p)->gpio))->OUTSET = (p)->pin_mask)
|
||||
#define mp_hal_pin_low(p) (((NRF_GPIO_Type *)((p)->gpio))->OUTCLR = (p)->pin_mask)
|
||||
#define mp_hal_pin_read(p) (((NRF_GPIO_Type *)((p)->gpio))->OUT >> ((p)->pin) & 1)
|
||||
#define mp_hal_pin_read(p) (((NRF_GPIO_Type *)((p)->gpio))->IN >> ((p)->pin) & 1)
|
||||
#define mp_hal_pin_write(p, v) do { if (v) { mp_hal_pin_high(p); } else { mp_hal_pin_low(p); } } while (0)
|
||||
|
||||
// TODO: empty implementation for now. Used by machine_spi.c:69
|
||||
|
|
Loading…
Reference in New Issue