Question
Using the inline compiling macro ?
I have an LCD is on an 8080 16bit FMC interface with A0 register select.
I can read the status correctly here:
#define LCD1_DEVICE_ADDR (uint32_t)0x60000000
#define LCD1_DEVICE_DATA (uint32_t)0x60000001
uint16_t *pLcdRStatusWAddress = LCD1_DEVICE_ADDR;
readLcdStatus = *pLcdRStatusWAddress;
All of these snippets are within one file,
//this compiles:
inline lcdRegDataWrite(uint8_t reg, uint8_t data) {
*(__IO uint16_t*)LCD1_DEVICE_ADDR = reg;
*(__IO uint16_t*)LCD1_DEVICE_DATA = data;
}
//but this doesn't find it
lcdRegDataWrite( 1 , 8);
>>> undefined reference to `lcdRegDataWrite'