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:
Glenn Ruben Bakke 2017-06-02 21:06:36 +02:00
parent db0f4963b7
commit d5acc13d5e
1 changed files with 1 additions and 1 deletions

View File

@ -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