nrf5/modules/music: Removing c++ extern definition. Updating include list in modmusic.c. Removing module name from module struct.
This commit is contained in:
parent
01441c8f59
commit
10e6b4309b
@ -24,18 +24,14 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "microbitobj.h"
|
// #include "microbitobj.h"
|
||||||
#include "microbitmusic.h"
|
// #include "microbitmusic.h"
|
||||||
|
#include "py/obj.h"
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
#include "py/objstr.h"
|
#include "py/objstr.h"
|
||||||
#include "py/mphal.h"
|
#include "py/mphal.h"
|
||||||
#include "modmicrobit.h"
|
#include "modmusic.h"
|
||||||
#include "microbit/microbitobj.h"
|
#include "musictunes.h"
|
||||||
#include "microbit/microbitpin.h"
|
|
||||||
#include "lib/pwm.h"
|
|
||||||
|
|
||||||
#define DEFAULT_BPM 120
|
#define DEFAULT_BPM 120
|
||||||
#define DEFAULT_TICKS 4 // i.e. 4 ticks per beat
|
#define DEFAULT_TICKS 4 // i.e. 4 ticks per beat
|
||||||
@ -474,8 +470,5 @@ STATIC MP_DEFINE_CONST_DICT(microbit_music_locals_dict, microbit_music_locals_di
|
|||||||
|
|
||||||
const mp_obj_module_t music_module = {
|
const mp_obj_module_t music_module = {
|
||||||
.base = { &mp_type_module },
|
.base = { &mp_type_module },
|
||||||
.name = MP_QSTR_music,
|
|
||||||
.globals = (mp_obj_dict_t*)µbit_music_locals_dict,
|
.globals = (mp_obj_dict_t*)µbit_music_locals_dict,
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
#ifndef __MICROPY_INCLUDED_MICROBIT_MUSIC_H__
|
#ifndef __MICROPY_INCLUDED_MICROBIT_MUSIC_H__
|
||||||
#define __MICROPY_INCLUDED_MICROBIT_MUSIC_H__
|
#define __MICROPY_INCLUDED_MICROBIT_MUSIC_H__
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
void microbit_music_tick(void);
|
void microbit_music_tick(void);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // __MICROPY_INCLUDED_MICROBIT_MUSIC_H__
|
#endif // __MICROPY_INCLUDED_MICROBIT_MUSIC_H__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user