You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write functions similar to analogRead(pin) etc for controlling and retrieving CTMU values (ctmuRead(pin) or analogReadCTMU(pin) or capSenseRead(pin) or something like that)
Since we would be needing to add the tables to the boards it may as well have the rest put in the core anyway rather than a library.
Comments? Go/No-go?
The text was updated successfully, but these errors were encountered:
majenkotech
changed the title
RFC: Add configuration and functions for CTMU to the core
Add configuration and functions for CTMU to the core. RFC
Jul 15, 2017
On Sat, Jul 15, 2017 at 5:32 PM, Majenko Technologies < ***@***.***> wrote:
Normally this kind of thing would be relegated to a library, but to make
things simple for users I propose adding it as core functions and data.
- Add a table to each board that maps digital pins to CTMU channels,
including a "NOT_CTMU_PIN" macro. For instance for the Lenny you would have:
const uint8_t digital_pin_to_ctmu_PGM[] = {
NOT_CTMU_PIN,
7,
3,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
12,
5,
2,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
13,
NOT_CTMU_PIN,
1,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
NOT_CTMU_PIN,
9,
6,
NOT_CTMU_PIN,
4,
10
};
- Add the stubs for functions to the defs file:
extern const uint8_t digital_pin_to_ctmu_PGM[];
#ifdef digitalPinToCTMU
#undef digialPinToCTMU
#endif
#define digitalPinToCTMU(P) ( digital_pin_to_ctmu_PGM[(P)] )
- Write functions similar to analogRead(pin) etc for controlling and
retrieving CTMU values (ctmuRead(pin) or analogReadCTMU(pin) or
capSenseRead(pin) or something like that)
Since we would be needing to add the tables to the boards it may as well
have the rest put in the core anyway rather than a library.
Comments? Go/No-go?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#360>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAbeCBeK8tM_yHwW7OhNVh4b8J-Sk5dZks5sOT3fgaJpZM4OZJKC>
.
Normally this kind of thing would be relegated to a library, but to make things simple for users I propose adding it as core functions and data.
analogRead(pin)
etc for controlling and retrieving CTMU values (ctmuRead(pin)
oranalogReadCTMU(pin)
orcapSenseRead(pin)
or something like that)Since we would be needing to add the tables to the boards it may as well have the rest put in the core anyway rather than a library.
Comments? Go/No-go?
The text was updated successfully, but these errors were encountered: