aboutsummaryrefslogtreecommitdiffstats
path: root/src/avr/main.c
Commit message (Collapse)AuthorAgeFilesLines
* command: Always pass a string to the DECL_CONSTANT() macroKevin O'Connor2019-03-171-1/+1
| | | | | | | | Make it clear that the name of the constant being defined is a string. When the value being defined is also a string, use a new DECL_CONSTANT_STR() macro. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Prefer uint8_t* for buffers; prefer uint8_fast_t for lengthsKevin O'Connor2018-05-281-1/+1
| | | | | | | | | Prefer using 'uint8_t' buffers as it is too easy to run into C sign extension problems with 'char' buffers. Prefer using 'uint_fast8_t' for buffer lengths as gcc does a better job compiling them on 32bit mcus. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Do not use Idle modeKevin O'Connor2018-04-281-8/+0
| | | | | | | | | | | | The AVR chips (bizarrely) start an ADC conversion when entering Idle mode. This behavior can cause the ADC to be busy when a sample is required. Worse, if a series of events cause the cpu to enter and leave Idle mode with a timing similar to the ADC checking rate then it can cause the ADC to show as busy for extended periods. This could cause high MCU load and possibly lead to a "Rescheduled timer in the past" shutdown. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Move prescaler and sleep initialization from timer.c to main.cKevin O'Connor2017-08-071-0/+21
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* basecmd: Move low-level alloc code into basecmd.cKevin O'Connor2017-07-201-24/+9
| | | | | | | | Implement new dynmem_start() and dynmem_end() functions instead of alloc_chunk() and alloc_chunks() in the board code. This simplifies the board code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Merge misc.c into main.cKevin O'Connor2017-05-111-1/+54
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* generic: Move generic parts of sam3x8e timer.c to generic directoryKevin O'Connor2017-03-111-0/+4
| | | | | | | | Most of sam3x8e/timer.c is going to be platform agnostic for any board with standard irq handling. Move the generic code into a new file generic/timer.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+17
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>