File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727
2828// ----- Project Includes -----
2929
30+ #if defined(_kinetis_ )
3031#include <kinetis.h>
3132
33+ #elif defined(_sam_ )
34+ #include <sam.h>
35+
36+ #endif
37+
3238
3339
3440// ----- Local Includes -----
Original file line number Diff line number Diff line change @@ -790,6 +790,7 @@ void cliFunc_version( char* args )
790790 printHex32_op ( SIM_UIDMH , 8 );
791791 printHex32_op ( SIM_UIDML , 8 );
792792 printHex32_op ( SIM_UIDL , 8 );
793+ #elif defined(_sam_ )
793794#elif defined(_avr_at_ )
794795#elif defined(_host_ )
795796#else
Original file line number Diff line number Diff line change 2525
2626#include <stdint.h>
2727#include <Lib/mcu_compat.h>
28+ #include <stdint.h>
2829
2930
3031
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ void _print( const char* s )
6464 {
6565 Output_putchar ( c );
6666 }
67- #elif defined(_kinetis_ ) // ARM
67+ #elif defined(_kinetis_ ) || defined( _sam_ ) // ARM
6868 Output_putstr ( (char * )s );
6969#elif defined(_host_ ) // Host
7070 Output_putstr ( (char * )s );
Original file line number Diff line number Diff line change 2929
3030#include <Lib/mcu_compat.h>
3131
32- // ARM
32+ // Kinetis ( ARM)
3333#if defined(_kinetis_ )
3434
3535#include <Lib/kinetis.h>
3636
37+ // SAM (ARM)
38+ #elif defined(_sam_ )
39+
40+ #include <Lib/sam.h>
41+
3742// AVR
3843#elif defined(_avr_at_ )
3944
5156// ----- Defines -----
5257
5358// ARM
54- #if defined(_kinetis_ )
59+ #if defined(_kinetis_ ) || defined( _sam_ )
5560
5661// Map the Interrupt Enable/Disable to the AVR names
5762#define cli () __disable_irq()
Original file line number Diff line number Diff line change 3232
3333
3434
35- // ARM
35+ // Kinetis ( ARM)
3636#if defined(_kinetis_ )
3737
3838#include "kinetis.h"
4343
4444
4545
46+ // SAM (ARM)
47+ #if defined(_sam_ )
48+
49+ #include "sam.h"
50+ #include "delay.h"
51+ #include "time.h"
52+
53+ #endif
54+
55+
56+
4657// AVR
4758#if defined(_avr_at_ )
4859
Original file line number Diff line number Diff line change 3232
3333
3434
35- // ARM
35+ // Kinetis ( ARM)
3636#if defined(_kinetis_ )
3737
3838#include <Lib/kinetis.h>
4242
4343
4444
45+ // SAM (ARM)
46+ #if defined(_sam_ )
47+
48+ #include <Lib/sam.h>
49+ #include <Lib/time.h>
50+
51+ #endif
52+
53+
54+
4555// AVR
4656#if defined(_avr_at_ )
4757
Original file line number Diff line number Diff line change 3030#include <Lib/mcu_compat.h>
3131
3232
33- // ARM
33+ // Kinetis ( ARM)
3434#if defined(_kinetis_ )
3535
3636#include "kinetis.h"
4141
4242
4343
44+ // SAM (ARM)
45+ #if defined(_sam_ )
46+ #include "sam.h"
47+ #include "delay.h"
48+ #include "time.h"
49+
50+ #endif
51+
52+
53+
4454// AVR
4555#if defined(_avr_at_ )
4656
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ Linker scripts can be found in the [ld](ld) directory.
3939
4040* [ kinetis.c] ( kinetis.c ) - Kinetis-based MCU initialization and IRQ setup.
4141* [ kinetis.h] ( kinetis.h ) - Register definitions for Kinetis-based MCUs.
42+ * [ sam.c] ( sam.c ) - SAM-based MCU initialization and IRQ setup.
43+ * [ sam.h] ( sam.c ) - Register definitions for Sam-based MCUs.
4244
4345
4446## Misc
Original file line number Diff line number Diff line change 3131
3232
3333
34- // ARM
34+ // Kinetis ( ARM)
3535#if defined(_kinetis_ )
3636
3737#include "kinetis.h"
4242
4343
4444
45+ // SAM (ARM)
46+ #if defined(_sam_ )
47+
48+ #include "sam.h"
49+ #include "delay.h"
50+ #include "time.h"
51+
52+ #endif
53+
54+
55+
4556// AVR
4657#if defined(_avr_at_ )
4758
You can’t perform that action at this time.
0 commit comments