mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
WIO_LTE fix SD card initialisation
This commit is contained in:
parent
32e52bf19c
commit
ee11a83581
@ -15,6 +15,7 @@
|
||||
Add `E.dumpFreeList` in non-release builds to help with debugging
|
||||
Fix mild memory leak in jsvMakeIntoVariableName that caused GC to run more often than normal
|
||||
E.toString now tries harder to allocate a Flat String, and works with no-alloc for Uint8Array/FlatStrings
|
||||
WIO_LTE fix SD card initialisation
|
||||
|
||||
1v95 : nRF5x: Swap to UART fifo to avoid overrun errors at high baud rates
|
||||
Ensure Exceptions/errors are reported on a blank line
|
||||
|
||||
@ -139,6 +139,13 @@ void jswrap_wio_lte_setLEDPower(bool pwr) {
|
||||
"generate" : "jswrap_wio_lte_init"
|
||||
}*/
|
||||
void jswrap_wio_lte_init() {
|
||||
// initialise the SD card
|
||||
jsvUnLock(jspEvaluate("(function(){digitalWrite(A15,1);var spi=new SPI();spi.setup({mosi:D2,miso:C8,sck:C12});E.connectSDCard(spi,C11);})();",true));
|
||||
/* initialise the SD card
|
||||
C8 D0 MISO
|
||||
C9 D1 unused
|
||||
C10 D2 unused
|
||||
C11 D3 CS
|
||||
C12 CK SCK
|
||||
D2 CMD MOSI
|
||||
*/
|
||||
jsvUnLock(jspEvaluate("(function(){digitalWrite([C9,C10],0);var spi=new SPI();spi.setup({mosi:D2,miso:C8,sck:C12});pinMode(C8,\"input_pullup\");digitalWrite(A15,1);E.connectSDCard(spi,C11);})();",true));
|
||||
}
|
||||
|
||||
@ -259,8 +259,8 @@ codeOut("#define RAM_TOTAL ("+str(board.chip['ram'])+"*1024)")
|
||||
codeOut("#define FLASH_TOTAL ("+str(board.chip['flash'])+"*1024)")
|
||||
codeOut("");
|
||||
if LINUX:
|
||||
codeOut('#define RESIZABLE_JSVARS // Allocate variables in blocks using malloc')
|
||||
#codeOut("#define JSVAR_CACHE_SIZE "+str(200)+" // Number of JavaScript variables in RAM")
|
||||
#codeOut('#define RESIZABLE_JSVARS // Allocate variables in blocks using malloc')
|
||||
codeOut("#define JSVAR_CACHE_SIZE "+str(60)+" // Number of JavaScript variables in RAM")
|
||||
else:
|
||||
codeOut("#define JSVAR_CACHE_SIZE "+str(variables)+" // Number of JavaScript variables in RAM")
|
||||
codeOut("#define FLASH_AVAILABLE_FOR_CODE "+str(int(flash_available_for_code)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user