Changeset edf846e in rtems for c/src/lib/libbsp/arm/lpc24xx/ssp


Ignore:
Timestamp:
May 20, 2010, 2:23:13 PM (10 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.10, 4.11, 5, master
Children:
c3dd440
Parents:
ef6f1d0c
Message:

2010-05-20 Sebastian Huber <sebastian.huber@…>

  • include/lpc24xx.h, misc/dma-copy.c, misc/dma.c, misc/system-clocks.c, ssp/ssp.c, startup/bspstarthooks.c: Removed superfluous macros.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/lpc24xx/ssp/ssp.c

    ref6f1d0c redf846e  
    8888  uint32_t icr = 0;
    8989
    90   if (IS_FLAG_SET(mis, SSP_MIS_RORRIS)) {
     90  if ((mis & SSP_MIS_RORRIS) != 0) {
    9191    /* TODO */
    9292    printk("%s: Receiver overrun!\n", __func__);
     
    106106
    107107  /* Return if we are not in a transfer status */
    108   if (IS_FLAG_CLEARED(status, LPC24XX_SSP_DMA_TRANSFER_FLAG)) {
     108  if ((status & LPC24XX_SSP_DMA_TRANSFER_FLAG) == 0) {
    109109    return;
    110110  }
     
    122122    switch (status) {
    123123      case LPC24XX_SSP_DMA_WAIT:
    124         if (ARE_FLAGS_SET(tc, GPDMA_STATUS_CH_0 | GPDMA_STATUS_CH_1)) {
     124        if ((tc & (GPDMA_STATUS_CH_0 | GPDMA_STATUS_CH_1)) != 0) {
    125125          status = LPC24XX_SSP_DMA_DONE;
    126         } else if (IS_FLAG_SET(tc, GPDMA_STATUS_CH_0)) {
     126        } else if ((tc & GPDMA_STATUS_CH_0) != 0) {
    127127          status = LPC24XX_SSP_DMA_WAIT_FOR_CHANNEL_1;
    128         } else if (IS_FLAG_SET(tc, GPDMA_STATUS_CH_1)) {
     128        } else if ((tc & GPDMA_STATUS_CH_1) != 0) {
    129129          status = LPC24XX_SSP_DMA_WAIT_FOR_CHANNEL_0;
    130130        }
    131131        break;
    132132      case LPC24XX_SSP_DMA_WAIT_FOR_CHANNEL_0:
    133         if (IS_FLAG_SET(tc, GPDMA_STATUS_CH_1)) {
     133        if ((tc & GPDMA_STATUS_CH_1) != 0) {
    134134          status = LPC24XX_SSP_DMA_ERROR;
    135         } else if (IS_FLAG_SET(tc, GPDMA_STATUS_CH_0)) {
     135        } else if ((tc & GPDMA_STATUS_CH_0) != 0) {
    136136          status = LPC24XX_SSP_DMA_DONE;
    137137        }
    138138        break;
    139139      case LPC24XX_SSP_DMA_WAIT_FOR_CHANNEL_1:
    140         if (IS_FLAG_SET(tc, GPDMA_STATUS_CH_0)) {
     140        if ((tc & GPDMA_STATUS_CH_0) != 0) {
    141141          status = LPC24XX_SSP_DMA_ERROR;
    142         } else if (IS_FLAG_SET(tc, GPDMA_STATUS_CH_1)) {
     142        } else if ((tc & GPDMA_STATUS_CH_1) != 0) {
    143143          status = LPC24XX_SSP_DMA_DONE;
    144144        }
     
    364364  e->idle_char = mode->idle_char;
    365365
    366   while (IS_FLAG_CLEARED(regs->sr, SSP_SR_TFE)) {
     366  while ((regs->sr & SSP_SR_TFE) == 0) {
    367367    /* Wait */
    368368  }
     
    427427
    428428    /* Write */
    429     if (IS_FLAG_SET(sr, SSP_SR_TNF) && m < LPC24XX_SSP_FIFO_SIZE) {
     429    if ((sr & SSP_SR_TNF) != 0 && m < LPC24XX_SSP_FIFO_SIZE) {
    430430      regs->dr = *out;
    431431      ++w;
     
    434434
    435435    /* Read */
    436     if (IS_FLAG_SET(sr, SSP_SR_RNE)) {
     436    if ((sr & SSP_SR_RNE) != 0) {
    437437      *in = (unsigned char) regs->dr;
    438438      ++r;
     
    449449    do {
    450450      sr = regs->sr;
    451     } while (IS_FLAG_CLEARED(sr, SSP_SR_RNE));
     451    } while ((sr & SSP_SR_RNE) == 0);
    452452
    453453    /* Read */
Note: See TracChangeset for help on using the changeset viewer.