nrf5/modules/music: Adding config guard in musictunes.c and adding import of mphal.h.

This commit is contained in:
Glenn Ruben Bakke 2017-05-08 22:05:23 +02:00
parent a84ed760b5
commit d3509517f5
1 changed files with 5 additions and 0 deletions

View File

@ -29,8 +29,11 @@
* THE SOFTWARE.
*/
#include "py/mphal.h"
#include "py/objtuple.h"
#if MICROPY_PY_MUSIC
#define N(q) MP_OBJ_NEW_QSTR(MP_QSTR_ ## q)
#define T(name, ...) const mp_obj_tuple_t microbit_music_tune_ ## name ## _obj = {{&mp_type_tuple}, .len = (sizeof((mp_obj_t[]){__VA_ARGS__})/sizeof(mp_obj_t)), .items = {__VA_ARGS__}};
@ -157,3 +160,5 @@ T(power_down,
#undef N
#undef T
#endif // MICROPY_PY_MUSIC