Echelon Neuron C Manuel d'utilisateur Page 131

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 267
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 130
Neuron C Reference Guide 111
Syntax
void memset (void *
p
, int
c
, unsigned long
len
);
Example
unsigned target[20];
void f(void)
{
memset(target, 0, sizeof(target));
}
min( ) Built-in Function
The min( ) built-in function compares
a
and
b
and returns the smaller value. The
result
type
is determined by the types of
a
and
b
, as described for max( ) on page
107.
Syntax
type
min (
a
,
b
);
Example
int a, b, c;
long x, y, z;
void f(void)
{
a = min(b, c);
x = min(y, z);
}
msec_delay( ) Function
The msec_delay( ) function allows an application to suspend processing for a time
interval specified by
milliseconds
. The maximum delay is 255 ms. This function
provides more precise timing than can be achieved with application timers, and
provides an easier way to specify millisecond delays than the delay( ) or
scaled_delay( ) functions. See delay( ) and scaled_delay( ) for functions that can
delay the application program for a longer duration.
Syntax
void msec_delay(unsigned short
milliseconds
);
milliseconds
A number of milliseconds to delay (max of 255 ms).
Example
IO_4 input bit io_push_button;
boolean debounced_button_state;
Vue de la page 130
1 2 ... 126 127 128 129 130 131 132 133 134 135 136 ... 266 267

Commentaires sur ces manuels

Pas de commentaire