Echelon Neuron C Manual de usuario Pagina 107

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 267
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 106
Neuron C Reference Guide 87
go_unconfigured( ) Function
The go_unconfigured( ) function puts the device into an unconfigured state. It
also overwrites all the domain information, which clears authentication keys as
well.
The go_unconfigured( ) function can be used after detecting and logging a serious,
unrecoverable error. Some security devices also call this function when they
detect a attempt to tamper with the device, and thus render the device
inoperational and erase the secret authentication keys.
Syntax
#include <control.h>
void go_unconfigured (void);
Example
void f() {
...
if (unrecoverable) {
error_log(MY_UNRECOVERABLE_ERROR);
go_unconfigured();
}
}
high_byte( ) Built-in Function
The high_byte( ) built-in function extracts the upper single-byte value from the
a
double-byte operand. This function operates without regard to signedness. See
also low_byte( ), make_long( ), and swap_bytes( ).
Syntax
unsigned short high_byte (unsigned long
a
);
Example
short b;
long a;
void f(void)
{
a = 258; // Hex value 0x0102
b = high_byte(a); // b now contains the value 0x01
}
interrupt_control( ) Built-in Function
The interrupt_control( ) built-in function enables or disables interrupts. You can
call the interrupt_control( ) function at any time to enable or disable one or more
of the three interrupt types: I/O interrupts, timer/counter interrupts, or periodic
system timer interrupts. This function applies only to the hardware interrupts
Vista de pagina 106
1 2 ... 102 103 104 105 106 107 108 109 110 111 112 ... 266 267

Comentarios a estos manuales

Sin comentarios