This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
wakeup(){ | |
wakeup=/proc/acpi/wakeup | |
if [ "$#" -lt 2 ]; then | |
devices=$(grep -e 'bled' $wakeup | cut -f 1 | tr -s '\n' ' ') | |
echo "$0 disable|enable [ $devices]" | |
return 1 | |
fi | |
case $1 in | |
*dis*) state="enabled" ; msg="disabling" ;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/false | |
# This file is part of Espruino, a JavaScript interpreter for Microcontrollers | |
# | |
# Copyright (C) 2013 Gordon Williams <[email protected]> | |
# | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# | |
# ---------------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/false | |
# This file is part of Espruino, a JavaScript interpreter for Microcontrollers | |
# | |
# Copyright (C) 2013 Gordon Williams <[email protected]> | |
import pinutils; | |
info = { | |
'name' : "Magic 3", | |
'link' : [ "https://www.kospet.com/products/kospet-magic-3" ], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maxlen=56; | |
NRF.setServices({ | |
0x190A : { // Desay AT commands service ID (DS-D6, HX03W) | |
0x0002 : { | |
maxLen: maxlen, | |
notify: true | |
}, | |
0x0001 : { | |
writable : true, | |
maxLen: maxlen, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/jswrap_process.c b/src/jswrap_process.c | |
index f6c738c3..21470116 100644 | |
--- a/src/jswrap_process.c | |
+++ b/src/jswrap_process.c | |
@@ -126,6 +126,9 @@ JsVar *jswrap_process_env() { | |
#ifndef SAVE_ON_FLASH | |
// Pointer to a list of predefined exports - eventually we'll get rid of the array above | |
jsvObjectSetChildAndUnLock(obj, "EXPTR", jsvNewFromInteger((JsVarInt)(size_t)exportPtrs)); | |
+extern uint32_t app_ram_base; | |
+ jsvObjectSetChildAndUnLock(obj, "APP_RAM_BASE", jsvNewFromInteger((JsVarInt)app_ram_base)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -- 0. check https://github.com/fanoush/ds-d6/wiki/Replacing-Nordic-DFU-bootloader for fixing MBR settings UICR at 0x10001018 | |
// this is needed before flashing any softdevice/bootloader upgrading/downgrading package | |
// basically peek32(0x10001018).toString(16); shoud return 0x7e000 and not 0xffffffff or you will brick device by downgrading SDK/SoftrDevice !!! | |
/* something like this should work (+disconnect/reconnect) | |
NRF.onRestart=function(){ | |
poke32(0x4001e504,1);while(!peek32(0x4001e400)); // enable flash writing | |
poke32(0x10001018,0x7E000);while(!peek32(0x4001e400)); // set mbr settings | |
poke32(0x4001e504, 0);while(!peek32(0x4001e400)); // disable flash writing | |
} | |
NRF.restart(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur nRF5_SDK_14.2.0_17b948a/components/boards/custom_board.h nRF5_SDK_14.2.0/components/boards/custom_board.h | |
--- nRF5_SDK_14.2.0_17b948a/components/boards/custom_board.h 1970-01-01 01:00:00.000000000 +0100 | |
+++ nRF5_SDK_14.2.0/components/boards/custom_board.h 2021-03-10 19:26:42.386034500 +0100 | |
@@ -0,0 +1,173 @@ | |
+/** | |
+ * Copyright (c) 2014 - 2017, Nordic Semiconductor ASA | |
+ * | |
+ * All rights reserved. | |
+ * | |
+ * Redistribution and use in source and binary forms, with or without modification, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/false | |
# This file is part of Espruino, a JavaScript interpreter for Microcontrollers | |
# | |
# Copyright (C) 2013 Gordon Williams <[email protected]> | |
# | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# | |
# ---------------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/false | |
# This file is part of Espruino, a JavaScript interpreter for Microcontrollers | |
# | |
# Copyright (C) 2013 Gordon Williams <[email protected]> | |
# | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# | |
# ---------------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/targetlibs/stm32f4/lib/stm32f4xx_conf.h b/targetlibs/stm32f4/lib/stm32f4xx_conf.h | |
index 2f33cd4f..885f551f 100755 | |
--- a/targetlibs/stm32f4/lib/stm32f4xx_conf.h | |
+++ b/targetlibs/stm32f4/lib/stm32f4xx_conf.h | |
@@ -26,7 +26,7 @@ | |
#if defined (HSE_VALUE) | |
/* Redefine the HSE value; it's equal to 8 MHz on the STM32F4-DISCOVERY Kit */ | |
#undef HSE_VALUE | |
- #define HSE_VALUE ((uint32_t)8000000) | |
+ #define HSE_VALUE ((uint32_t)25000000) |
NewerOlder