re-enable parameters check.

This commit is contained in:
jun2sak 2021-02-26 00:50:44 +09:00
parent 61a69daae1
commit 9328d09a7a
2 changed files with 2 additions and 17 deletions

View File

@ -46,15 +46,12 @@ volatile nrfx_gpiote_pin_t _pinhandler_ev_pin;
#define MYGPIOTE_EV_PIN_UNDEF 0xFF #define MYGPIOTE_EV_PIN_UNDEF 0xFF
void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, mcu_pin_obj_t *pin, bool value, bool edge, bool pull) { void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, mcu_pin_obj_t *pin, bool value, bool edge, bool pull) {
#if 0
if (edge) { if (edge) {
mp_raise_ValueError(translate("Cannot wake on pin edge. Only level.")); mp_raise_ValueError(translate("Cannot wake on pin edge. Only level."));
} }
if (pin->number >= NUMBER_OF_PINS) {
if (pull && !GPIO_IS_VALID_OUTPUT_GPIO(pin->number)) { mp_raise_ValueError(translate("Invalid pin"));
mp_raise_ValueError(translate("Cannot pull on input-only pin."));
} }
#endif
self->pin = pin; self->pin = pin;
self->value = value; self->value = value;
self->pull = pull; self->pull = pull;

View File

@ -1,12 +0,0 @@
//#include "shared-bindings/alarm_io/__init__.h"
// these are in esp32s2 implementation,
// but not used in nrf
#if 0
mp_obj_t common_hal_alarm_io_pin_state (alarm_io_obj_t *self_in) {
}
void common_hal_alarm_io_disable (void) {
}
#endif