/ * @brief * Configure EBI pin polarity * * @param[in] line * Which pin/line to configure * * @param[in] polarity * Active high, or active low ******************************************************************************/
| 412 | * Active high, or active low |
| 413 | ******************************************************************************/ |
| 414 | void EBI_PolaritySet(EBI_Line_TypeDef line, EBI_Polarity_TypeDef polarity) |
| 415 | { |
| 416 | switch (line) |
| 417 | { |
| 418 | case ebiLineARDY: |
| 419 | BITBAND_Peripheral(&(EBI->POLARITY), _EBI_POLARITY_ARDYPOL_SHIFT, polarity); |
| 420 | break; |
| 421 | case ebiLineALE: |
| 422 | BITBAND_Peripheral(&(EBI->POLARITY), _EBI_POLARITY_ALEPOL_SHIFT, polarity); |
| 423 | break; |
| 424 | case ebiLineWE: |
| 425 | BITBAND_Peripheral(&(EBI->POLARITY), _EBI_POLARITY_WEPOL_SHIFT, polarity); |
| 426 | break; |
| 427 | case ebiLineRE: |
| 428 | BITBAND_Peripheral(&(EBI->POLARITY), _EBI_POLARITY_REPOL_SHIFT, polarity); |
| 429 | break; |
| 430 | case ebiLineCS: |
| 431 | BITBAND_Peripheral(&(EBI->POLARITY), _EBI_POLARITY_CSPOL_SHIFT, polarity); |
| 432 | break; |
| 433 | #if defined (_EFM32_GIANT_FAMILY) |
| 434 | case ebiLineBL: |
| 435 | BITBAND_Peripheral(&(EBI->POLARITY), _EBI_POLARITY_BLPOL_SHIFT, polarity); |
| 436 | break; |
| 437 | case ebiLineTFTVSync: |
| 438 | BITBAND_Peripheral(&(EBI->TFTPOLARITY), _EBI_TFTPOLARITY_VSYNCPOL_SHIFT, polarity); |
| 439 | break; |
| 440 | case ebiLineTFTHSync: |
| 441 | BITBAND_Peripheral(&(EBI->TFTPOLARITY), _EBI_TFTPOLARITY_HSYNCPOL_SHIFT, polarity); |
| 442 | break; |
| 443 | case ebiLineTFTDataEn: |
| 444 | BITBAND_Peripheral(&(EBI->TFTPOLARITY), _EBI_TFTPOLARITY_DATAENPOL_SHIFT, polarity); |
| 445 | break; |
| 446 | case ebiLineTFTDClk: |
| 447 | BITBAND_Peripheral(&(EBI->TFTPOLARITY), _EBI_TFTPOLARITY_DCLKPOL_SHIFT, polarity); |
| 448 | break; |
| 449 | case ebiLineTFTCS: |
| 450 | BITBAND_Peripheral(&(EBI->TFTPOLARITY), _EBI_TFTPOLARITY_CSPOL_SHIFT, polarity); |
| 451 | break; |
| 452 | #endif |
| 453 | default: |
| 454 | EFM_ASSERT(0); |
| 455 | break; |
| 456 | } |
| 457 | } |
| 458 | |
| 459 | |
| 460 | /***************************************************************************//** |
no test coverage detected