Built-in variables, Activate_service_led variable, Config_data variable – Echelon Neuron C User Manual
Page 211
Neuron C Reference Guide
191
Built-In Variables
The following sections list the Neuron C built-in variables alphabetically,
providing relevant syntax information and a detailed description of each function.
activate_service_led
Variable
The activate_service_led variable can be assigned a value by the application
program to control the service LED status. Assign a non-zero value to
activate_service_led to turn the service LED on. Assign a zero value to turn the
service LED off. The
variable as follows:
extern system int activate_service_led;
This variable is located in RAM space belonging to the Neuron firmware. Its
value is not preserved after a reset.
There can be a delay of up to one second between the time that the application
program sets this variable and the time that its new value is sensed and acted
upon by the Neuron firmware. Therefore, attempts to flash the service LED are
limited to a minimum period of one second.
Example:
// Turn on service LED
activate_service_led = TRUE;
// Turn off service LED
activate_service_led = FALSE;
config_data
Variable
The config_data variable defines the hardware and transceiver properties of this
device. It is located in EEPROM, and parts of it belong to the application image
written during device manufacture, and to the network image written during
device installation. The type is a structure declared in
#define LOCATION_LEN 6
#define NUM_COMM_PARAMS 7
typedef struct {
// This embedded struct starts at
// offset 0x11 when placed in outer struct
unsigned collision_detect : 1;
unsigned bit_sync_threshold
: 2;
unsigned
filter :
2;
unsigned hysteresis
: 3;
// offset 0x12 starts here when it is nested
// in the outer struct below
unsigned cd_to_end_packet : 6;
unsigned
cd_tail
:
1;
unsigned cd_preamble
: 1;
} direct_param_struct;
typedef struct { // This is the outer struct
unsigned long channel_id;
// offset 0x00
char location[LOCATION_LEN];
// offset 0x02
unsigned comm_clock : 5; // offset 0x08