How to create a variable at an absolute address in DRAM ?

MicroController
Posts: 1749
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: How to create a variable at an absolute address in DRAM ?

Postby MicroController » Sun Mar 05, 2023 11:40 am

How about

Code: Select all

if((addr >= ADDR_FLASH_SECTOR_0) && (addr < (ADDR_FLASH_SECTOR_0 + SIZE_FLASH_SECTOR_0)))
  return 0;
else if((addr >= ADDR_FLASH_SECTOR_1) && (addr < (ADDR_FLASH_SECTOR_1 + SIZE_FLASH_SECTOR_1)))
  return 1;
else ...
?

Who is online

Users browsing this forum: No registered users and 91 guests