remove trailing whitespace
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5575 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
f2e40f1ace
commit
53c164a93b
|
@ -124,13 +124,13 @@ void ext_lld_channel_enable(EXTDriver *extp, expchannel_t channel) {
|
|||
|
||||
/* program the IOpin for this channel */
|
||||
LPC_SYSCON->PINTSEL[channel] = extp->config->channels[channel].iopin;
|
||||
|
||||
|
||||
/* Programming edge irq enables */
|
||||
if (extp->config->channels[channel].mode & EXT_CH_MODE_RISING_EDGE)
|
||||
LPC_PIN_INT->SIENR = (1 << channel);
|
||||
else
|
||||
LPC_PIN_INT->CIENR = (1 << channel);
|
||||
|
||||
|
||||
if (extp->config->channels[channel].mode & EXT_CH_MODE_FALLING_EDGE)
|
||||
LPC_PIN_INT->SIENF = (1 << channel);
|
||||
else
|
||||
|
@ -139,7 +139,7 @@ void ext_lld_channel_enable(EXTDriver *extp, expchannel_t channel) {
|
|||
LPC_PIN_INT->RISE = (1<<channel);
|
||||
LPC_PIN_INT->FALL = (1<<channel);
|
||||
LPC_PIN_INT->IST = (1<<channel);
|
||||
|
||||
|
||||
ext_lld_exti_irq_enable( channel );
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
/*===========================================================================*/
|
||||
static void ext_lld_interrupt( uint32_t n ) {
|
||||
uint32_t reason;
|
||||
|
||||
|
||||
reason = ((LPC_PIN_INT->RISE)>> n ) & 0x01;
|
||||
reason |= ((LPC_PIN_INT->FALL)>>(n-1)) & 0x02;
|
||||
LPC_PIN_INT->RISE = (1<<n);
|
||||
|
|
|
@ -171,7 +171,7 @@ void gpt_lld_init(void) {
|
|||
void gpt_lld_start(GPTDriver *gptp) {
|
||||
|
||||
if( !clk_enabled ) {
|
||||
|
||||
|
||||
/* Enable clock & reset MRT */
|
||||
LPC_SYSCON->SYSAHBCLKCTRL |= (1<<10);
|
||||
LPC_SYSCON->PRESETCTRL &= ~(1<<7);
|
||||
|
@ -179,7 +179,7 @@ void gpt_lld_start(GPTDriver *gptp) {
|
|||
|
||||
nvicEnableVector(MRT_IRQn,
|
||||
CORTEX_PRIORITY_MASK(LPC8xx_GPT_MRT_IRQ_PRIORITY));
|
||||
|
||||
|
||||
clk_enabled |= gptp->mask;
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ void gpt_lld_stop(GPTDriver *gptp) {
|
|||
/* Shared peripheral -
|
||||
mark this channel as disabled */
|
||||
clk_enabled &= ~gptp->mask;
|
||||
|
||||
|
||||
/* All channels disabled? */
|
||||
if( !clk_enabled )
|
||||
{
|
||||
|
@ -268,7 +268,7 @@ void gpt_lld_polled_delay(GPTDriver *gptp, gptcnt_t interval) {
|
|||
|
||||
while (gptp->tmr->STAT & (1<<1))
|
||||
;
|
||||
|
||||
|
||||
gptp->tmr->CTRL = 0;
|
||||
gptp->tmr->STAT |= 1;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ void lpc8xx_clock_init(void) {
|
|||
// switch off pull-ups
|
||||
LPC_IOCON->PIO0_8 &= ~(3<<3);
|
||||
LPC_IOCON->PIO0_9 &= ~(3<<3);
|
||||
|
||||
|
||||
// enable xtalin/xtalout
|
||||
LPC_SWM->PINENABLE0 &= ~(3<<4);
|
||||
|
||||
|
@ -126,7 +126,6 @@ void lpc8xx_clock_init(void) {
|
|||
/* ABH divider initialization. Set this **before** switching Main clock
|
||||
source to ensure AHB clock stays in spec */
|
||||
LPC_SYSCON->SYSAHBCLKDIV = LPC8xx_SYSABHCLK_DIV;
|
||||
|
||||
|
||||
/* Main clock source selection.*/
|
||||
LPC_SYSCON->MAINCLKSEL = LPC8xx_MAINCLK_SOURCE;
|
||||
|
|
|
@ -88,7 +88,7 @@ void _pal_lld_setgroupmode(ioportid_t port,
|
|||
case PAL_MODE_INPUT:
|
||||
port->DIR0 &= ~mask;
|
||||
break;
|
||||
|
||||
|
||||
case PAL_MODE_UNCONNECTED:
|
||||
palSetPort(port, PAL_WHOLE_PORT);
|
||||
//no break
|
||||
|
@ -96,7 +96,7 @@ void _pal_lld_setgroupmode(ioportid_t port,
|
|||
port->DIR0 |= mask;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ static void set_error(SerialDriver *sdp, IOREG32 err) {
|
|||
sts |= SD_FRAMING_ERROR;
|
||||
if (err & STAT_RXBRK)
|
||||
sts |= SD_BREAK_DETECTED;
|
||||
|
||||
|
||||
chSysLockFromIsr();
|
||||
chnAddFlagsI(sdp, sts);
|
||||
chSysUnlockFromIsr();
|
||||
|
@ -96,7 +96,7 @@ static void serve_interrupt(SerialDriver *sdp) {
|
|||
LPC_USART_TypeDef *u = sdp->uart;
|
||||
|
||||
while (u->INTSTAT) {
|
||||
|
||||
|
||||
if (u->INTSTAT & STAT_RXRDY) {
|
||||
chSysLockFromIsr();
|
||||
if (chIQIsEmptyI(&sdp->iqueue))
|
||||
|
@ -105,7 +105,7 @@ static void serve_interrupt(SerialDriver *sdp) {
|
|||
chnAddFlagsI(sdp, SD_OVERRUN_ERROR);
|
||||
chSysUnlockFromIsr();
|
||||
}
|
||||
|
||||
|
||||
if (u->INTSTAT & STAT_TXRDY) {
|
||||
msg_t b;
|
||||
|
||||
|
@ -124,7 +124,7 @@ static void serve_interrupt(SerialDriver *sdp) {
|
|||
u->TXDATA = b;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (u->INTSTAT & (STAT_OVERRUN | STAT_DELTARXBRK |
|
||||
STAT_FRAMERR | STAT_PARITYERR) ) {
|
||||
IOREG32 stat = u->STAT;
|
||||
|
@ -265,7 +265,7 @@ void sd_lld_start( SerialDriver *sdp, const SerialConfig *config ) {
|
|||
config = &default_config;
|
||||
|
||||
if (sdp->state == SD_STOP) {
|
||||
|
||||
|
||||
#if LPC8xx_SERIAL_USE_UART0
|
||||
if (&SD1 == sdp) {
|
||||
LPC_SYSCON->SYSAHBCLKCTRL |= (1<<14); // Enable Clk
|
||||
|
|
|
@ -56,7 +56,7 @@ static void spi_load_txdata(SPIDriver *spip) {
|
|||
if (--spip->txcnt == 0) {
|
||||
spi->TXCTRL |= SPI_TXCTRL_EOT;
|
||||
}
|
||||
|
||||
|
||||
if (spip->txptr != NULL) {
|
||||
if ((spi->TXCTRL & SPI_TXCTRL_FLEN_MASK) > SPI_TXCTRL_FLEN(8)) {
|
||||
const uint16_t *p = spip->txptr;
|
||||
|
@ -88,7 +88,7 @@ static void spi_serve_interrupt(SPIDriver *spip) {
|
|||
LPC8xx_SPI_ERROR_HOOK(spip);
|
||||
spi->STAT = (SPI_STAT_RXOV | SPI_STAT_TXUR);
|
||||
}
|
||||
|
||||
|
||||
if (spi->INTSTAT & SPI_STAT_TXRDY) {
|
||||
spi_load_txdata( spip );
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ void spi_lld_stop(SPIDriver *spip) {
|
|||
|
||||
if (spip->state != SPI_STOP) {
|
||||
spip->spi->CFG = 0;
|
||||
|
||||
|
||||
#if LPC8xx_SPI_USE_SPI0
|
||||
if (&SPID1 == spip) {
|
||||
nvicDisableVector(SPI0_IRQn);
|
||||
|
|
Loading…
Reference in New Issue