Echelon Neuron C Instrukcja Użytkownika Strona 154

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 267
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 153
134 Functions
The function enables or disables the lock (with a TRUE or FALSE argument,
respectively).
The EEPROM lock feature reduces the chances that a hardware failure or
application anomaly can lead to a corruption of checksummed onchip EEPROM
or offchip EEPROM or flash memory. The lock is automatically suspended while
a device is offline to allow network management operations to occur. The
application must release the lock prior to performing self-configuration.
Application EEPROM variables are not locked. For more information, including
a discussion of the drawbacks of using this feature, see #pragma eeprom_locked
in Chapter
2,
Compiler Directives
, on page 19.
Syntax
#include <control.h>
void set_eeprom_lock (boolean
lock
);
Example
#include <control.h>
when (reset)
{
// Lock the EEPROM to prevent accidental writes
set_eeprom_lock(TRUE);
}
...
void f(void)
{
// Unlock EEPROM for update
set_eeprom_lock(FALSE);
...//Update EEPROM
//Relock EEPROM
set_eeprom_lock (TRUE)
...
}
Signed 32-bit Arithmetic Support Functions
void s32_abs (const s32_type *
arg1
, s32_type *
arg2
);
void s32_add (const s32_type *
arg1
, const s32_type *
arg2
, s32_type *
arg3
);
int s32_cmp (const s32_type *
arg1
, const s32_type *
arg2
);
void s32_dec (s32_type *
arg1
);
void s32_div (const s32_type *
arg1
, const s32_type *
arg2
, s32_type *
arg3
);
void s32_div2 (s32_type *
arg1
);
void s32_eq (const s32_type *
arg1
, const s32_type *
arg2
);
void s32_from_ascii (const char *
arg1
, s32_type *
arg2
);
void s32_from_slong (signed long
arg1
, s32_type *
arg2
);
void s32_from_ulong (unsigned long
arg1
, s32_type *
arg2
);
Przeglądanie stron 153
1 2 ... 149 150 151 152 153 154 155 156 157 158 159 ... 266 267

Komentarze do niniejszej Instrukcji

Brak uwag