[code] Each script has a name, stored in the accordeon buffer.

A script can now be imported in the console.
Moved all the MicroPython functions to python/port files.

Change-Id: I0a23e8cb20005719b800e81470e1c574c702c3b7
This commit is contained in:
Léa Saviot
2017-10-19 13:52:18 +02:00
committed by Romain Goyet
parent f3200fe2e9
commit 5de4b5cd67
34 changed files with 868 additions and 600 deletions

22
apps/code/script.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include "script.h"
namespace Code {
Script::Script(char * textBuffer, size_t sizeOfBuffer) :
m_bufferSize(sizeOfBuffer),
m_textBuffer(textBuffer)
{
}
const char * Script::readOnlyContent() const {
return m_textBuffer;
}
char * Script::editableContent() {
return m_textBuffer;
}
size_t Script::bufferSize() const {
return m_bufferSize;
}
}