nrf5/modules/music: Correct parameter checking of pin argument to deside whether to use MUSIC_PIN define or throw an error. If MUSIC_PIN define is configured the pin argument to music module play() can be elided.
This commit is contained in:
parent
db0f4963b7
commit
d5acc13d5e
|
@ -337,7 +337,7 @@ STATIC mp_obj_t microbit_music_play(mp_uint_t n_args, const mp_obj_t *pos_args,
|
|||
|
||||
// get the pin to play on
|
||||
const pin_obj_t *pin;
|
||||
if (n_args >= 2) {
|
||||
if (args[1].u_obj == MP_OBJ_NULL) {
|
||||
#ifdef MICROPY_HW_MUSIC_PIN
|
||||
pin = &MICROPY_HW_MUSIC_PIN;
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue