-
Notifications
You must be signed in to change notification settings - Fork 437
Description
Hi,
Following is my code on Arduino IDE using ATMEGA2560 Board.
`#include <SPI.h>
#include "ugui.h"
#include "ugui_config.h"
#define DISPLAY_WIDTH 160
#define DISPLAY_HEIGHT 128
#define MAX_OBJECTS 10
#define BuffOUT 40
char bufferOut[BuffOUT];
void window_1_callback(UG_MESSAGE *msg);
UG_GUI gui1963;
UG_COLOR color[3];
void my_int_func(UG_S16 x,UG_S16 y,UG_COLOR z)
{
unsigned int sum=0;
sum=x+y+z;
}
void setup()
{
void (*foo)(UG_S16,UG_S16,UG_COLOR);
foo = &my_int_func;
UG_Init(&gui1963, foo(2,2,3), 160, 128);
UG_COLOR color[3];
UG_WINDOW window_1;
UG_BUTTON button_1;
UG_BUTTON button_2;
UG_BUTTON button_3;
UG_TEXTBOX textbox_1;
UG_OBJECT obj_buff_wnd_1[MAX_OBJECTS];
UG_Init(&gui1963, foo(2,2,3), 160, 128);
}
void loop()
{
// put your main code here, to run repeatedly:
}`
I encounter following error when compiling. Kindly provide an insight of whats going wrong?
testugui:27:43: error: invalid use of void expression
UG_Init(&gui1963, foo(2,2,3), 160, 128);
^
testugui:37:43: error: invalid use of void expression
UG_Init(&gui1963, foo(2,2,3), 160, 128);
Regards,