Echelon Neuron C Manuel d'utilisateur Page 122

  • 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 121
102 Functions
infrared
ontime
period
pulsecount
totalcount
clock-value
Specifies an optional clock value, in the range 0 to 7, or a
variable name for the clock. This value permanently
overrides a clock value specified in the object’s
declaration. The clock value option can only be specified
for the infrared, ontime, and period objects.
Example
IO_5 input ontime pcount1;
IO_6 input ontime pcount2;
unsigned long variable1;
when (io_update_occurs(pcount_1))
{
variable1 = input_value;
// select next I/O object
io_select(pcount_2);
}
io_set_baud( ) Built-in Function
The io_set_baud( ) built-in function allows an application to optionally change the
baud rate for an SCI device. The SCI device optionally has an initial bit rate
setting from its declaration.
See also Chapter
2,
Compiler Directives
, on page 19, for information about the
specify_io_clock compiler directive.
Syntax
void io_set_baud (
io-object-name
,
baud-rate
);
io-object-name
The I/O object name that corresponds to
io-object-name
in
the I/O declaration. This built-in function is used only for
sci I/O objects.
baud-rate
The serial bit rate through use of the enumeration values
found in the <io_types.h> include file. These enumeration
values are SCI_300, SCI_600, SCI_1200, SCI_2400,
SCI_4800, SCI_9600, SCI_19200, SCI_38400, SCI_57600,
and SCI_115200. The enumeration values select serial bit
rates of 300, 600, 1200, 2400, 4800, 9600, 19200, 38400,
57600, and 115200, respectively.
Example
IO_8 sci baud(SCI_2400) iosci;
when (...)
Vue de la page 121
1 2 ... 117 118 119 120 121 122 123 124 125 126 127 ... 266 267

Commentaires sur ces manuels

Pas de commentaire