git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1220 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
e1eef3b015
commit
8da7f367ee
|
@ -38,10 +38,10 @@ void _pal_lld_init(const AT91SAM7XPIOConfig *config) {
|
|||
AT91C_BASE_PMC->PMC_PCER = (1 << AT91C_ID_PIOA) | (1 << AT91C_ID_PIOB);
|
||||
|
||||
/*
|
||||
* PIOA setup.
|
||||
* PIOA setup.
|
||||
*/
|
||||
AT91C_BASE_PIOA->PIO_OER = config->P0Data.pusr; /* Pull-up as spec.*/
|
||||
AT91C_BASE_PIOA->PIO_ODR = ~config->P0Data.pusr;
|
||||
AT91C_BASE_PIOA->PIO_PPUER = config->P0Data.pusr; /* Pull-up as spec.*/
|
||||
AT91C_BASE_PIOA->PIO_PPUDR = ~config->P0Data.pusr;
|
||||
AT91C_BASE_PIOA->PIO_PER = 0xFFFFFFFF; /* PIO enabled.*/
|
||||
AT91C_BASE_PIOA->PIO_ODSR = config->P0Data.odsr; /* Data as specified.*/
|
||||
AT91C_BASE_PIOA->PIO_OER = config->P0Data.osr; /* Dir. as specified.*/
|
||||
|
@ -53,10 +53,10 @@ void _pal_lld_init(const AT91SAM7XPIOConfig *config) {
|
|||
AT91C_BASE_PIOA->PIO_OWER = 0xFFFFFFFF; /* Write enabled.*/
|
||||
|
||||
/*
|
||||
* PIOB setup.
|
||||
* PIOB setup.
|
||||
*/
|
||||
AT91C_BASE_PIOB->PIO_OER = config->P0Data.pusr; /* Pull-up as spec.*/
|
||||
AT91C_BASE_PIOB->PIO_ODR = ~config->P0Data.pusr;
|
||||
AT91C_BASE_PIOB->PIO_PPUER = config->P0Data.pusr; /* Pull-up as spec.*/
|
||||
AT91C_BASE_PIOB->PIO_PPUDR = ~config->P0Data.pusr;
|
||||
AT91C_BASE_PIOB->PIO_PER = 0xFFFFFFFF; /* PIO enabled.*/
|
||||
AT91C_BASE_PIOB->PIO_ODSR = config->P1Data.odsr; /* Data as specified.*/
|
||||
AT91C_BASE_PIOB->PIO_OER = config->P1Data.osr; /* Dir. as specified.*/
|
||||
|
|
Loading…
Reference in New Issue