
Rev.1.00 May 22 2012
REJ09B0566
4.2.7 38BMulti Function Timer Pulse Unit
4) R_MTU_Read
Synopsis
Read from timer channel registers.
Prototype bool R_MTU_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
uint16_t * data4, // A pointer to the data storage location
uint16_t * data5, // A pointer to the data storage location
uint16_t * data6, // A pointer to the data storage location
uint16_t * data7 // A pointer to the data storage location
uint16_t * data8, // A pointer to the data storage location
uint16_t * data9 // A pointer to the data storage location
);
Description
Read any of the timer’s counter, compare or status flag registers.
[data1]
The channel number n (where n = 0 to 4).
[data2]
The status flags shall be stored in the format below.
The input capture / compare match flags A to D will be set to1 if the condition has been detected.
For n = 0, 1, 2 or 3
b7 b6 b5 b4 b3 b2 b1 b0
Count
Direction
Flag
-
Underflow
detection
Overflow
flag
TGRD
Input
capture /
compare
match
detection
TGRC
Input
capture /
compare
match
detection
TGRB
Input
capture /
compare
match
detection
TGRA
Input
capture /
compare
match
detection
TCFD - TCFU TCFV TGFD TGFC TGFB TGFA
[data3]
A pointer to where the counter value shall be stored. Specify PDL_NA if it is not required.
[data4]
Where the general register A value shall be stored. Specify PDL_NA if it is not required.
[data5]
Where the general register B value shall be stored. Specify PDL_NA if it is not required.
[data6]
Where the general register C value shall be stored. Specify PDL_NA if it is not required.
[data7]
Where the general register D value shall be stored. Specify PDL_NA if it is not required.
[data8]
Where the general register E value shall be stored. Specify PDL_NA if it is not required.
[data9]
Where the general register F value shall be stored. Specify PDL_NA if it is not required.
Return value
True if all parameters are valid and exclusive; otherwise false.
Category
Multi-function timer pulse unit
Reference
R_MTU_Create
Remarks • Any detection flag that has been set to 1 shall be automatically cleared to 0 by this function.
Commentaires sur ces manuels