/ * @brief * Return base address of EBI bank * * @param[in] bank * Bank to return start address for * * @return * Absolute address of bank ******************************************************************************/
| 324 | * Absolute address of bank |
| 325 | ******************************************************************************/ |
| 326 | uint32_t EBI_BankAddress(uint32_t bank) |
| 327 | { |
| 328 | #if defined (_EFM32_GIANT_FAMILY) |
| 329 | if(EBI->CTRL & EBI_CTRL_ALTMAP) |
| 330 | { |
| 331 | switch (bank) |
| 332 | { |
| 333 | case EBI_BANK0: |
| 334 | return(EBI_MEM_BASE); |
| 335 | |
| 336 | case EBI_BANK1: |
| 337 | return(EBI_MEM_BASE + 0x10000000UL); |
| 338 | |
| 339 | case EBI_BANK2: |
| 340 | return(EBI_MEM_BASE + 0x20000000UL); |
| 341 | |
| 342 | case EBI_BANK3: |
| 343 | return(EBI_MEM_BASE + 0x30000000UL); |
| 344 | |
| 345 | default: |
| 346 | EFM_ASSERT(0); |
| 347 | break; |
| 348 | } |
| 349 | } |
| 350 | #endif |
| 351 | switch (bank) |
| 352 | { |
| 353 | case EBI_BANK0: |
| 354 | return(EBI_MEM_BASE); |
| 355 | |
| 356 | case EBI_BANK1: |
| 357 | return(EBI_MEM_BASE + 0x04000000UL); |
| 358 | |
| 359 | case EBI_BANK2: |
| 360 | return(EBI_MEM_BASE + 0x08000000UL); |
| 361 | |
| 362 | case EBI_BANK3: |
| 363 | return(EBI_MEM_BASE + 0x0C000000UL); |
| 364 | |
| 365 | default: |
| 366 | EFM_ASSERT(0); |
| 367 | break; |
| 368 | } |
| 369 | return 0; |
| 370 | } |
| 371 | |
| 372 | |
| 373 | /***************************************************************************//** |