mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
micro:bit compile fixes
This commit is contained in:
parent
048c9fbbb7
commit
8cef796d92
@ -205,7 +205,7 @@ void jswrap_microbit_show(JsVar *image) {
|
||||
|
||||
if ((newState!=0) && (microbitLEDState==0)) {
|
||||
// we want to display something but we don't have an interval
|
||||
JshSysTime period = jshGetTimeFromMilliseconds(5);
|
||||
JsSysTime period = jshGetTimeFromMilliseconds(5);
|
||||
jstExecuteFn(jswrap_microbit_display_callback, jshGetSystemTime()+period, (uint32_t)period);
|
||||
// and also set pins to outputs
|
||||
nrf_gpio_cfg_output(MB_LED_COL1);
|
||||
|
||||
@ -93,12 +93,14 @@ void sys_evt_handler(uint32_t sys_evt) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NRF52
|
||||
NRF_PWM_Type *nrf_get_pwm(JshPinFunction func) {
|
||||
if ((func&JSH_MASK_TYPE) == JSH_TIMER1) return NRF_PWM0;
|
||||
else if ((func&JSH_MASK_TYPE) == JSH_TIMER2) return NRF_PWM1;
|
||||
else if ((func&JSH_MASK_TYPE) == JSH_TIMER3) return NRF_PWM2;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static NO_INLINE void jshPinSetFunction_int(JshPinFunction func, uint32_t pin) {
|
||||
JshPinFunction fType = func&JSH_MASK_TYPE;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user