Skip to content
Snippets Groups Projects
Commit 27b8d0f5 authored by fleur's avatar fleur
Browse files

Made docs a bit more beginner friendly

i actually managed to fuck up masking during testing even though i wrote
it, so i figured this might be a nice addition.
parent 8f96af95
Branches
No related tags found
No related merge requests found
......@@ -126,9 +126,11 @@ API(API_INTERRUPT_DISABLE, int epic_interrupt_disable(api_int_id_t int_id));
#define EPIC_INT_UART_RX 2
/** RTC Alarm interrupt. See :c:func:`epic_isr_rtc_alarm` */
#define EPIC_INT_RTC_ALARM 3
/** Button interrupt */
#define EPIC_INT_BUTT 4
/* Number of defined interrupts. */
#define EPIC_INT_NUM 4
#define EPIC_INT_NUM 5
/* clang-format on */
API_ISR(EPIC_INT_RESET, epic_isr_reset);
......@@ -232,7 +234,7 @@ API_ISR(EPIC_INT_CTRL_C, epic_isr_ctrl_c);
*
* Always reads all buttons, use mask=15 for not wasting slow-ish API calls and extract values in pycardium. Note: The reset button cannot be unmapped from reset functionality afaik.
*
* :param uint8_t mask: The first 4 LSBs enable readout from corresponding button. The zeroeth bit corresponds to bottom left pin, increasing counterclockwise. If buttons module is imported in micropython also the designators BOTTOM_LEFT, BOTTOM_RIGHT, TOP_RIGHT, TOP_LEFT and RESET can be used with the latter two being identical.
* :param uint8_t mask: The first 4 LSBs enable readout from corresponding button. The zeroeth bit corresponds to bottom left pin, increasing counterclockwise, i.e. mask values of 1, 2, 4, 8 read single buttons, others read combinations. If buttons module is imported in micropython also the designators BOTTOM_LEFT, BOTTOM_RIGHT, TOP_RIGHT, TOP_LEFT and RESET can be used with the latter two being identical.
*/
API(API_BUTTONS_READ, uint8_t epic_buttons_read(uint8_t mask));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment