2018-04-25 10:34 AM
Hi,
I am working in STM3241G-EVAL, and i am trying to load the buffer with all black pixel values but i am getting an error saying 'Expression is not assignable'
/*Camera Application header file*/
#define CAMERA_FRAME_BUFFER 0x64100000
/* Camera Initialization*/
void CAMERA_Init(void)
{ /* Initialize the Camera */ CameraError = BSP_CAMERA_Init(RESOLUTION_R320x240); BSP_CAMERA_BlackWhiteConfig(CAMERA_BLACK_WHITE_BW); if( CameraError != CAMERA_ERROR) { GUI_Delay(100); /* Start the capture */ BSP_CAMERA_ContinuousStart((uint8_t *)CAMERA_FRAME_BUFFER); CAMERA_Set_ContrastBrightness(CameraSettings.b.contrast, CameraSettings.b.brightness); }}/*Trying to put white color in all pixel*/
for (i = IMAGE_COLUMN_SIZE; i > 0; i-- )
{ for ( j = 0; j < 2 * IMAGE_LINE_SIZE; j += 2 ) { CAMERA_FRAME_BUFFER = 0xFFFF; // I have error in this statement } }Please help me solve this.
2018-04-25 11:18 PM
#define CAMERA_FRAME_BUFFER 0x64100000
...
CAMERA_FRAME_BUFFER = 0xFFFF; // I have error in this statement
Because an immediate value is not an object, you can't assign anything to it.
This is a C language issue.
2018-04-26 01:32 AM
Can you please help me how to assign values to the buffer 'CAMERA_FRAME_BUFFER'
2018-04-26 02:27 AM
A good C tutorial should tell you how to assign a fixed address to a pointer variable.
Or see the stm32fxxx.h device header files - they contain plenty of examples, defining/assigning addresses of MCU peripherals.
2018-04-26 02:32 AM
thanks a lot