aboutsummaryrefslogtreecommitdiff
path: root/ports/nrf/mphalport.h
diff options
context:
space:
mode:
Diffstat (limited to 'ports/nrf/mphalport.h')
-rw-r--r--ports/nrf/mphalport.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/nrf/mphalport.h b/ports/nrf/mphalport.h
index 15b37b7ef..5900559b5 100644
--- a/ports/nrf/mphalport.h
+++ b/ports/nrf/mphalport.h
@@ -54,8 +54,10 @@ void mp_hal_delay_us(mp_uint_t us);
const char *nrfx_error_code_lookup(uint32_t err_code);
+#define MP_HAL_PIN_FMT "%q"
#define mp_hal_pin_obj_t const pin_obj_t *
#define mp_hal_get_pin_obj(o) pin_find(o)
+#define mp_hal_pin_name(p) ((p)->name)
#define mp_hal_pin_high(p) nrf_gpio_pin_set(p->pin)
#define mp_hal_pin_low(p) nrf_gpio_pin_clear(p->pin)
#define mp_hal_pin_read(p) (nrf_gpio_pin_dir_get(p->pin) == NRF_GPIO_PIN_DIR_OUTPUT) ? nrf_gpio_pin_out_read(p->pin) : nrf_gpio_pin_read(p->pin)