git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1355 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2009-11-29 10:50:14 +00:00
parent f90ae4d17d
commit ecbccffa62
2 changed files with 8 additions and 6 deletions

View File

@ -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.*/

View File

@ -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