Skip to content

Commit 5d0ba1c

Browse files
committed
[sam] adding more peripherals to SAM3X/Due
1 parent acfd670 commit 5d0ba1c

File tree

19 files changed

+5431
-48
lines changed

19 files changed

+5431
-48
lines changed

hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam.h

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232

3333
#define part_is_defined(part) (defined(__ ## part ## __))
3434

35-
/*
35+
/*
3636
* ----------------------------------------------------------------------------
37-
* SAM3 family
37+
* SAM3 family
3838
* ----------------------------------------------------------------------------
3939
*/
4040

@@ -66,8 +66,17 @@
6666
/* Entire SAM3N series */
6767
#define SAM3N_SERIES (SAM3N00 || SAM3N0 || SAM3N1 || SAM3N2 || SAM3N4)
6868

69-
69+
7070
/* SAM3S series */
71+
#define SAM3S00 ( \
72+
part_is_defined( SAM3S00A ) || \
73+
part_is_defined( SAM3S00B ) )
74+
75+
#define SAM3S0 ( \
76+
part_is_defined( SAM3S0A ) || \
77+
part_is_defined( SAM3S0B ) || \
78+
part_is_defined( SAM3S0C ) )
79+
7180
#define SAM3S1 ( \
7281
part_is_defined( SAM3S1A ) || \
7382
part_is_defined( SAM3S1B ) || \
@@ -84,7 +93,7 @@
8493
part_is_defined( SAM3S4C ) )
8594

8695
/* Entire SAM3S series */
87-
#define SAM3S_SERIES (SAM3S1 || SAM3S2 || SAM3S4)
96+
#define SAM3S_SERIES (SAM3S00 || SAM3S0 ||SAM3S1 || SAM3S2 || SAM3S4)
8897

8998
/* SAM3SD8 series */
9099
#define SAM3S8 ( \
@@ -133,9 +142,9 @@
133142
/* Entire SAM3XA series */
134143
#define SAM3XA_SERIES ( SAM3X4 || SAM3X8 || SAM3A4 || SAM3A8)
135144

136-
/*
145+
/*
137146
* ----------------------------------------------------------------------------
138-
* SAM4 family
147+
* SAM4 family
139148
* ----------------------------------------------------------------------------
140149
*/
141150

@@ -158,30 +167,30 @@
158167
/* Entire SAM4 Family */
159168
#define SAM4_SERIES ( SAM4S_SERIES )
160169

161-
/*
170+
/*
162171
* ----------------------------------------------------------------------------
163-
* SAM9 family
172+
* SAM9 family
164173
* ----------------------------------------------------------------------------
165174
*/
166175

167-
/*
176+
/*
168177
* ----------------------------------------------------------------------------
169-
* SAM7 family
178+
* SAM7 family
170179
* ----------------------------------------------------------------------------
171180
*/
172181

173182

174183

175-
/*
184+
/*
176185
* ----------------------------------------------------------------------------
177186
* Whole SAM product line
178187
* ----------------------------------------------------------------------------
179188
*/
180189
#define SAM ( SAM3_SERIES || SAM4_SERIES )
181190

182-
/*
191+
/*
183192
* ----------------------------------------------------------------------------
184-
* Header inclusion
193+
* Header inclusion
185194
* ----------------------------------------------------------------------------
186195
*/
187196

hardware/arduino/sam/system/libsam/build_gcc/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,17 @@ SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables --no-print-directory
2525
#-------------------------------------------------------------------------------
2626

2727
# libsam_sam3s4c_gcc_rel.a libsam_sam3u4e_gcc_rel.a libsam_sam3x8e_gcc_rel.a libsam_sam3x8h_gcc_rel.a
28-
all: libsam_sam3s4c_gcc_dbg.a libsam_sam3u4e_gcc_dbg.a libsam_sam3x8e_gcc_dbg.a libsam_sam3x8h_gcc_dbg.a
28+
all: libsam_sam3s4c_gcc_dbg.a libsam_sam3u4e_gcc_dbg.a libsam_sam3x8e_gcc_dbg.a libsam_sam3x8h_gcc_dbg.a arduino_due_x
2929

30+
.PHONY: arduino_due_u
3031
arduino_due_u:
3132
@echo ------------------------------------------------------------------------------------
3233
@echo --- Making $@
3334
@echo ---
3435
@$(MAKE) CHIP=__SAM3U4E__ $(SUBMAKE_OPTIONS) OUTPUT_BIN=../../../variants/arduino_due_u -f sam3.mk
3536
@echo ------------------------------------------------------------------------------------
3637

38+
.PHONY: arduino_due_x
3739
arduino_due_x:
3840
@echo ------------------------------------------------------------------------------------
3941
@echo --- Making $@

hardware/arduino/sam/system/libsam/chip.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,20 @@
4242
* Peripherals
4343
*/
4444
#include "include/adc.h"
45+
#if (SAM3XA_SERIES) || (SAM3N_SERIES) || (SAM3S_SERIES)
4546
#include "include/dacc.h"
47+
#endif // (SAM3XA_SERIES) || (SAM3N_SERIES) || (SAM3S_SERIES)
48+
4649
#include "include/interrupt_sam_nvic.h"
50+
#include "include/efc.h"
51+
#include "include/gpbr.h"
4752
#include "include/pio.h"
4853
#include "include/pmc.h"
4954
#include "include/pwmc.h"
5055
#include "include/rtc.h"
5156
#include "include/rtt.h"
5257
#include "include/spi.h"
58+
#include "include/ssc.h"
5359
#include "include/tc.h"
5460
#include "include/twi.h"
5561
#include "include/usart.h"
@@ -59,9 +65,12 @@
5965
#include "include/USB_device.h"
6066
#include "include/USB_host.h"
6167

62-
#if SAM3XA_SERIES
68+
#if (SAM3XA_SERIES)
69+
#include "include/can.h"
70+
//#include "include/emac.h"
71+
#include "include/trng.h"
6372
#include "include/uotghs_device.h"
6473
#include "include/uotghs_host.h"
65-
#endif /* SAM3XA_SERIES */
74+
#endif /* (SAM3XA_SERIES) */
6675

6776
#endif /* _LIB_SAM_ */

0 commit comments

Comments
 (0)