Skip to content

Commit

Permalink
[sam] adding more peripherals to SAM3X/Due
Browse files Browse the repository at this point in the history
  • Loading branch information
aethaniel committed Dec 19, 2012
1 parent 6fa2895 commit 337fb78
Show file tree
Hide file tree
Showing 19 changed files with 5,431 additions and 48 deletions.
35 changes: 22 additions & 13 deletions system/CMSIS/Device/ATMEL/sam.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@

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

/*
/*
* ----------------------------------------------------------------------------
* SAM3 family
* SAM3 family
* ----------------------------------------------------------------------------
*/

Expand Down Expand Up @@ -66,8 +66,17 @@
/* Entire SAM3N series */
#define SAM3N_SERIES (SAM3N00 || SAM3N0 || SAM3N1 || SAM3N2 || SAM3N4)


/* SAM3S series */
#define SAM3S00 ( \
part_is_defined( SAM3S00A ) || \
part_is_defined( SAM3S00B ) )

#define SAM3S0 ( \
part_is_defined( SAM3S0A ) || \
part_is_defined( SAM3S0B ) || \
part_is_defined( SAM3S0C ) )

#define SAM3S1 ( \
part_is_defined( SAM3S1A ) || \
part_is_defined( SAM3S1B ) || \
Expand All @@ -84,7 +93,7 @@
part_is_defined( SAM3S4C ) )

/* Entire SAM3S series */
#define SAM3S_SERIES (SAM3S1 || SAM3S2 || SAM3S4)
#define SAM3S_SERIES (SAM3S00 || SAM3S0 ||SAM3S1 || SAM3S2 || SAM3S4)

/* SAM3SD8 series */
#define SAM3S8 ( \
Expand Down Expand Up @@ -133,9 +142,9 @@
/* Entire SAM3XA series */
#define SAM3XA_SERIES ( SAM3X4 || SAM3X8 || SAM3A4 || SAM3A8)

/*
/*
* ----------------------------------------------------------------------------
* SAM4 family
* SAM4 family
* ----------------------------------------------------------------------------
*/

Expand All @@ -158,30 +167,30 @@
/* Entire SAM4 Family */
#define SAM4_SERIES ( SAM4S_SERIES )

/*
/*
* ----------------------------------------------------------------------------
* SAM9 family
* SAM9 family
* ----------------------------------------------------------------------------
*/

/*
/*
* ----------------------------------------------------------------------------
* SAM7 family
* SAM7 family
* ----------------------------------------------------------------------------
*/



/*
/*
* ----------------------------------------------------------------------------
* Whole SAM product line
* ----------------------------------------------------------------------------
*/
#define SAM ( SAM3_SERIES || SAM4_SERIES )

/*
/*
* ----------------------------------------------------------------------------
* Header inclusion
* Header inclusion
* ----------------------------------------------------------------------------
*/

Expand Down
4 changes: 3 additions & 1 deletion system/libsam/build_gcc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables --no-print-directory
#-------------------------------------------------------------------------------

# libsam_sam3s4c_gcc_rel.a libsam_sam3u4e_gcc_rel.a libsam_sam3x8e_gcc_rel.a libsam_sam3x8h_gcc_rel.a
all: libsam_sam3s4c_gcc_dbg.a libsam_sam3u4e_gcc_dbg.a libsam_sam3x8e_gcc_dbg.a libsam_sam3x8h_gcc_dbg.a
all: libsam_sam3s4c_gcc_dbg.a libsam_sam3u4e_gcc_dbg.a libsam_sam3x8e_gcc_dbg.a libsam_sam3x8h_gcc_dbg.a arduino_due_x

.PHONY: arduino_due_u
arduino_due_u:
@echo ------------------------------------------------------------------------------------
@echo --- Making $@
@echo ---
@$(MAKE) CHIP=__SAM3U4E__ $(SUBMAKE_OPTIONS) OUTPUT_BIN=../../../variants/arduino_due_u -f sam3.mk
@echo ------------------------------------------------------------------------------------

.PHONY: arduino_due_x
arduino_due_x:
@echo ------------------------------------------------------------------------------------
@echo --- Making $@
Expand Down
13 changes: 11 additions & 2 deletions system/libsam/chip.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,20 @@
* Peripherals
*/
#include "include/adc.h"
#if (SAM3XA_SERIES) || (SAM3N_SERIES) || (SAM3S_SERIES)
#include "include/dacc.h"
#endif // (SAM3XA_SERIES) || (SAM3N_SERIES) || (SAM3S_SERIES)

#include "include/interrupt_sam_nvic.h"
#include "include/efc.h"
#include "include/gpbr.h"
#include "include/pio.h"
#include "include/pmc.h"
#include "include/pwmc.h"
#include "include/rtc.h"
#include "include/rtt.h"
#include "include/spi.h"
#include "include/ssc.h"
#include "include/tc.h"
#include "include/twi.h"
#include "include/usart.h"
Expand All @@ -59,9 +65,12 @@
#include "include/USB_device.h"
#include "include/USB_host.h"

#if SAM3XA_SERIES
#if (SAM3XA_SERIES)
#include "include/can.h"
//#include "include/emac.h"
#include "include/trng.h"
#include "include/uotghs_device.h"
#include "include/uotghs_host.h"
#endif /* SAM3XA_SERIES */
#endif /* (SAM3XA_SERIES) */

#endif /* _LIB_SAM_ */
Loading

0 comments on commit 337fb78

Please sign in to comment.