nrf5/modules/music: Including mphal.h before config guard in modmusic.c. Also changed name on config guard to MICROPY_PY_MUSIC. Missing PWM functions during linkage will show up if PWM module has not not configured.
This commit is contained in:
parent
24e902aa8f
commit
a84ed760b5
@ -24,14 +24,15 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if MICROPY_PY_MACHINE_SOFT_PWM || MICROPY_PY_MACHINE_HW_PWM
|
#include "py/mphal.h"
|
||||||
|
|
||||||
|
#if MICROPY_PY_MUSIC
|
||||||
|
|
||||||
// #include "microbitobj.h"
|
// #include "microbitobj.h"
|
||||||
// #include "microbitmusic.h"
|
// #include "microbitmusic.h"
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
#include "py/objstr.h"
|
#include "py/objstr.h"
|
||||||
#include "py/mphal.h"
|
|
||||||
#include "modmusic.h"
|
#include "modmusic.h"
|
||||||
#include "musictunes.h"
|
#include "musictunes.h"
|
||||||
#include "drivers/pwm.h"
|
#include "drivers/pwm.h"
|
||||||
@ -495,4 +496,4 @@ const mp_obj_module_t music_module = {
|
|||||||
.globals = (mp_obj_dict_t*)µbit_music_locals_dict,
|
.globals = (mp_obj_dict_t*)µbit_music_locals_dict,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MICROPY_PY_MACHINE_SOFT_PWM || MICROPY_PY_MACHINE_HW_PWM
|
#endif // MICROPY_PY_MUSIC
|
||||||
|
Loading…
Reference in New Issue
Block a user