diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-11-29 10:50:14 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-11-29 10:50:14 +0000 |
commit | ecbccffa627eca423c9780ab55d9ff737b69bd35 (patch) | |
tree | 931e13404c760b8f902dc29e0e76596965c310c8 | |
parent | f90ae4d17df24cd6477f2557bc86ef9433e93414 (diff) | |
download | ChibiOS-ecbccffa627eca423c9780ab55d9ff737b69bd35.tar.gz ChibiOS-ecbccffa627eca423c9780ab55d9ff737b69bd35.tar.bz2 ChibiOS-ecbccffa627eca423c9780ab55d9ff737b69bd35.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1355 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/platforms/AT91SAM7/pal_lld.c | 6 | ||||
-rw-r--r-- | os/hal/platforms/AT91SAM7/pal_lld.h | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/os/hal/platforms/AT91SAM7/pal_lld.c b/os/hal/platforms/AT91SAM7/pal_lld.c index 9545c976c..9ad9a02f5 100644 --- a/os/hal/platforms/AT91SAM7/pal_lld.c +++ b/os/hal/platforms/AT91SAM7/pal_lld.c @@ -38,7 +38,8 @@ void _pal_lld_init(const AT91SAM7PIOConfig *config) {
unsigned int ports = (1 << AT91C_ID_PIOA);
-#if defined(SAM7X128) || defined(SAM7X256) || defined(SAM7X512)
+#if (SAM7_PLATFORM == SAM7X128) || (SAM7_PLATFORM == SAM7X256) || \
+ (SAM7_PLATFORM == SAM7X256)
ports |= (1 << AT91C_ID_PIOB);
#endif
AT91C_BASE_PMC->PMC_PCER = ports;
@@ -61,7 +62,8 @@ void _pal_lld_init(const AT91SAM7PIOConfig *config) { /*
* PIOB setup.
*/
-#if defined(SAM7X128) || defined(SAM7X256) || defined(SAM7X512)
+#if (SAM7_PLATFORM == SAM7X128) || (SAM7_PLATFORM == SAM7X256) || \
+ (SAM7_PLATFORM == SAM7X256)
AT91C_BASE_PIOB->PIO_PPUER = config->P1Data.pusr; /* Pull-up as spec.*/
AT91C_BASE_PIOB->PIO_PPUDR = ~config->P1Data.pusr;
AT91C_BASE_PIOB->PIO_PER = 0xFFFFFFFF; /* PIO enabled.*/
diff --git a/os/hal/platforms/AT91SAM7/pal_lld.h b/os/hal/platforms/AT91SAM7/pal_lld.h index 950f3a52f..e2c836818 100644 --- a/os/hal/platforms/AT91SAM7/pal_lld.h +++ b/os/hal/platforms/AT91SAM7/pal_lld.h @@ -61,8 +61,8 @@ typedef struct { typedef struct {
/** @brief Port 0 setup data.*/
at91sam7_pio_setup_t P0Data;
-#if defined(SAM7X128) || defined(SAM7X256) || defined(SAM7X512) || \
- defined(__DOXYGEN__)
+#if (SAM7_PLATFORM == SAM7X128) || (SAM7_PLATFORM == SAM7X256) || \
+ (SAM7_PLATFORM == SAM7X256) || defined(__DOXYGEN__)
/** @brief Port 1 setup data.*/
at91sam7_pio_setup_t P1Data;
#endif
@@ -98,8 +98,8 @@ typedef AT91PS_PIO ioportid_t; /**
* @brief PIO port B identifier.
*/
-#if defined(SAM7X128) || defined(SAM7X256) || defined(SAM7X512) || \
- defined(__DOXYGEN__)
+#if (SAM7_PLATFORM == SAM7X128) || (SAM7_PLATFORM == SAM7X256) || \
+ (SAM7_PLATFORM == SAM7X256) || defined(__DOXYGEN__)
#define IOPORT2 AT91C_BASE_PIOB
#endif
|