mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2024-11-04 15:57:35 -05:00
Add dedicated scratch-space header so that we can track where these are still used
This commit is contained in:
parent
f113551aa6
commit
f090a75221
13
scratch_space.h
Normal file
13
scratch_space.h
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* The Arduino, unlike C/C++ on a regular computer with gigabytes of RAM, has very little memory.
|
||||
* We have to be very careful with variables that are declared inside the functions as they are
|
||||
* created in a memory region called the stack. The stack has just a few bytes of space on the Arduino
|
||||
* if you declare large strings inside functions, they can easily exceed the capacity of the stack
|
||||
* and mess up your programs.
|
||||
* We circumvent this by declaring a few global buffers as kitchen counters where we can
|
||||
* slice and dice our strings. These strings are mostly used to control the display or handle
|
||||
* the input and output from the USB port. We must keep a count of the bytes used while reading
|
||||
* the serial port as we can easily run out of buffer space. This is done in the serial_in_count variable.
|
||||
*/
|
||||
|
||||
extern char c[30], b[128];
|
Loading…
Reference in New Issue
Block a user