32 #include "../hsk_isr/hsk_isr.isr" 103 #define PWC_CC2_P44 7 108 #define PWC_CC2_P52 8 113 #define PWC_CC3_P34 9 118 #define PWC_CC3_P45 10 123 #define PWC_CC3_P57 11 128 #define PWC_EDGE_FALLING 0 133 #define PWC_EDGE_RISING 1 138 #define PWC_EDGE_BOTH 2 143 #define PWC_MODE_EXT 1 148 #define PWC_MODE_SOFT 3 222 const ubyte edgeMode);
236 const ubyte captureMode);
273 #define PWC_UNIT_SUM_RAW 0 286 #define PWC_UNIT_WIDTH_RAW 1 291 #define PWC_UNIT_WIDTH_NS 2 296 #define PWC_UNIT_WIDTH_US 3 301 #define PWC_UNIT_WIDTH_MS 4 318 #define PWC_UNIT_FREQ_S 5 326 #define PWC_UNIT_FREQ_M 6 337 #define PWC_UNIT_FREQ_H 7 361 #define PWC_UNIT_DUTYH_RAW 8 366 #define PWC_UNIT_DUTYH_NS 9 371 #define PWC_UNIT_DUTYH_US 10 376 #define PWC_UNIT_DUTYH_MS 11 381 #define PWC_UNIT_DUTYL_RAW 12 386 #define PWC_UNIT_DUTYL_NS 13 391 #define PWC_UNIT_DUTYL_US 14 396 #define PWC_UNIT_DUTYL_MS 15 void hsk_pwc_disable(void)
Turns off the T2CCU clock to preserve power.
Definition: hsk_pwc.c:809
void hsk_pwc_channel_trigger(const hsk_pwc_channel channel)
Triggers a channel in soft trigger mode.
Definition: hsk_pwc.c:771
void hsk_pwc_port_open(const hsk_pwc_port port, ubyte averageOver)
Opens an input port and the connected channel.
Definition: hsk_pwc.c:539
ubyte averageOver
The number of pulses to average over.
Definition: hsk_pwc.c:66
void hsk_pwc_enable(void)
Enables T2CCU module if disabled.
Definition: hsk_pwc.c:802
ubyte hsk_pwc_port
Typedef for PWC input port.
Definition: hsk_pwc.h:63
ulong hsk_pwc_channel_getValue(const hsk_pwc_channel channel, const ubyte unit)
Returns a measure of the values in a channel buffer.
Definition: hsk_pwc.c:816
void hsk_pwc_channel_open(const hsk_pwc_channel channel, ubyte averageOver)
Configures a PWC channel without an input port.
Definition: hsk_pwc.c:452
void hsk_pwc_channel_captureMode(const hsk_pwc_channel channel, const ubyte captureMode)
Allows switching between external and soft trigger.
Definition: hsk_pwc.c:761
void hsk_pwc_channel_close(const hsk_pwc_channel channel)
Close a PWC channel.
Definition: hsk_pwc.c:679
void hsk_pwc_channel_edgeMode(const hsk_pwc_channel channel, const ubyte edgeMode)
Select the edge that is used to detect a pulse.
Definition: hsk_pwc.c:737
ubyte hsk_pwc_channel
Typedef for PWC channel IDs.
Definition: hsk_pwc.h:38
void hsk_pwc_init(ulong window)
This function initializes the T2CCU Capture/Compare Unit for capture mode.
Definition: hsk_pwc.c:386