]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/commit
din: Split rpp_din_get() into two functions
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 8 Aug 2013 09:48:29 +0000 (11:48 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 8 Aug 2013 09:48:29 +0000 (11:48 +0200)
commit6f72643dd45f75c794ed56cc374a223fbdd3fd9b
treedb68d5db4e393e783407bedb10c44067b443bf96
parent0e123442039a78a81e5f4d526445831af4cf96c2
din: Split rpp_din_get() into two functions

One for reading via SPI chip, one for reading via comparators with
programmable threshold.

One of the reasons for split are the return values of the functions.
SPI chip reports whether a switch connected to the DIN pin is open or
closed, which depends on the pin setup. Comparators return logical value,
which might be a negated value returned by the SPI chip.
rpp/include/rpp/din.h
rpp/include/types.h
rpp/src/rpp/din.c