Chapter 3 Terminal Specific Function Library
121
SetNetConfig
Purpose
To write the whole networking configurations to the system.
Syntax
void SetNetConfig (struct NETCONFIG *config);
Example
struct NETCONFIG nc;
struct NETSTATUS ns;
..............................
GetNetConfig (&nc);
nc.DhcpEnable = 1;
SetNetConfig (&nc);
if (NetInit() < 0) {
printf ("Initialization Fail");
..................................
}
do {
OSTimeDly (10);
GetNetStatus (&ns);
} while (!ns.IPReady);
Description
This routine writes the whole network configurations to the system. Before
writing, the application should make sure that every setting is significant. The
best way is calling GetNetConfig first to get the original settings and change
them one by one.
The application should reserve enough stack or define a static variable to store
the structure of NETCONFIG.
It is recommended to use SetNetParameter() to set the parameters for the
stability and compatibility in the future. NetInit() will initialize the networking
according to the configurations written.
Return
None
See Also
GetNetConfig, SetNetParameter
Содержание Optimus R
Страница 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Страница 6: ......
Страница 8: ...2 C Programming Guide For Optimus S R...
Страница 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Страница 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Страница 24: ...18 C Programming Guide For Optimus S R...
Страница 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...
Страница 232: ...226 C Programming Guide For Optimus S R 4 11 Implementation defined Limits limits h float h Refer to limit h and float h...
Страница 238: ...232 C Programming Guide For Optimus S R...