Renesas Single-Chip Microcomputer M38C89T-ADF Instrukcja Użytkownika Strona 99

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 138
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 98
Rev.1.00 May 22 2012
REJ09B0566
4-79
Library Reference
4
4.2.7 Multi Function Timer Pulse Unit R_CMT_Read
4) R_CMT_Read
Synopsis
Read CMT channel status and registers.
Prototype bool R_CMT_Read(
uint8_t data1, // Channel selection
uint8_t * data2, // A pointer to the data storage location
uint16_t * data3
// A pointer to the data storage location
);
Description
Read and store the counter value and status flag.
[data1]
The channel number n (where n = 0, 1, 2 or 3).
[data2]
The compare match status flag shall be stored in the following format.
b7 b1 b0
-
0: Idle
1: Compare match condition detected
[data3]
A pointer to where the counter value shall be stored. Specify PDL_NA if it is not required.
Return value
True if all parameters are valid; otherwise false.
Category
Compare Match Timer
Reference
R_CMT_Create
Remarks
If the flag is set to 1, it shall be automatically cleared to 0 by this function.
Program example
/* PDL definitions */
#include r_pdl_cmt.h
/* PDL device-specific definitions */
#include r_pdl_definitions.h
uint8_t Flags;
uint16_t Counter;
void func(void)
{
/* Change the channel 2 values */
R_CMT_Read(
2,
&Flags,
&Counter
);
}
Przeglądanie stron 98
1 2 ... 94 95 96 97 98 99 100 101 102 103 104 ... 137 138

Komentarze do niniejszej Instrukcji

Brak uwag