HWA
Bare metal programming with style
|
A class _tcs3200
object is colour light-to-frequency converter, also called 'colour detector'.
The measurement of the output signal frequency is left to the user.
The following declarations create a device called sensor0
.
hw_sensor0_s1
and hw_sensor0_s0
must be declared if you want the configure
action to be able to change the frequency range of the signal.hw_sensor0_s3
and hw_sensor0_s2
must be declared if you want the configure
action to be able to change the filter.hw_sensor0_oe
must be declared if you want the configure
action to be able to control the signal output.Actions
configure
The user is responsible of the configuration of the I/O pins. The configure
action, allows the selection of the maximum frequency of the output signal, the filter, and the enabling of the output signal.