- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi, i'm using cyw95407aeval and i want do a tcp client but in this case i want to changethe mask, gateway and ip, as shown below but this not working .
unsigned long rn[]={255,255,0, 0};
unsigned long ri[]={172,10, 85, 0};
unsigned long rg[]={172,168, 100, 4};
unsigned long ip_address1 = MAKE_IPV4_ADDRESS(ri[0],ri[1],ri[2],ri[3]);
unsigned long netmask1 = MAKE_IPV4_ADDRESS(rn[0],rn[1],rn[2],rn[3]);
unsigned long gateway1 = MAKE_IPV4_ADDRESS(rg[0],rg[1],rg[2],rg[3]);
//const wiced_ip_address_t SET_IPV4_ADDRESS(ip_address,);
static wiced_ip_setting_t device_init_ip_settings1 ={
INITIALISER_IPV4_ADDRESS( .ip_address, ip_address1),
INITIALISER_IPV4_ADDRESS( .netmask, netmask1 ),
INITIALISER_IPV4_ADDRESS( .gateway,gateway1 ),
};
the log is INITIALISER_IPV4_ADDRESS is not a constant, how i can make it work ?
Solved! Go to Solution.
- Labels:
-
ispn:38948:1:0
-
l1:314:1:0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
EnPa_4771801 the issue is because, MAKE_IPV4_ADDRESS() expects the arguments passed to it to be a constant, rather than a variable.
Pass the address as MAKE_IPV4_ADDRESS(172,10,85,0); and the compilation should go through.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
EnPa_4771801 the issue is because, MAKE_IPV4_ADDRESS() expects the arguments passed to it to be a constant, rather than a variable.
Pass the address as MAKE_IPV4_ADDRESS(172,10,85,0); and the compilation should go through.
Thanks