Skip to content

Commit

Permalink
Enforce memory allocator for ChibiOS builds with allocating debounce …
Browse files Browse the repository at this point in the history
…algorithms (qmk#11630)
  • Loading branch information
tzarc authored Jan 30, 2021
1 parent 6a73e51 commit d31fe52
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions quantum/debounce/sym_defer_pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state.
#include "quantum.h"
#include <stdlib.h>

#ifdef PROTOCOL_CHIBIOS
# if CH_CFG_USE_MEMCORE == FALSE
# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm.
# endif
#endif

#ifndef DEBOUNCE
# define DEBOUNCE 5
#endif
Expand Down
6 changes: 6 additions & 0 deletions quantum/debounce/sym_eager_pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred.
#include "quantum.h"
#include <stdlib.h>

#ifdef PROTOCOL_CHIBIOS
# if CH_CFG_USE_MEMCORE == FALSE
# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm.
# endif
#endif

#ifndef DEBOUNCE
# define DEBOUNCE 5
#endif
Expand Down
6 changes: 6 additions & 0 deletions quantum/debounce/sym_eager_pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred.
#include "quantum.h"
#include <stdlib.h>

#ifdef PROTOCOL_CHIBIOS
# if CH_CFG_USE_MEMCORE == FALSE
# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm.
# endif
#endif

#ifndef DEBOUNCE
# define DEBOUNCE 5
#endif
Expand Down

0 comments on commit d31fe52

Please sign in to comment.