diff options
author | Joel Challis <git@zvecr.com> | 2020-04-01 21:06:22 +0100 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2020-06-12 17:00:27 +0900 |
commit | 3cc7234810250ca45a18399a08454f65c3a042b6 (patch) | |
tree | daf5d0564e8b5d4f540a0080f6823d229990128c /tmk_core/common/util.c | |
parent | 9362382ac0cb3fb0f0d4c8ebbcdcf769fbba670a (diff) |
Strip out features to allow minimum firmware sizes (#8645)
Diffstat (limited to 'tmk_core/common/util.c')
-rw-r--r-- | tmk_core/common/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tmk_core/common/util.c b/tmk_core/common/util.c index f4f018de8d..861cca0054 100644 --- a/tmk_core/common/util.c +++ b/tmk_core/common/util.c @@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "util.h" // bit population - return number of on-bit -uint8_t bitpop(uint8_t bits) { +__attribute__((noinline)) uint8_t bitpop(uint8_t bits) { uint8_t c; for (c = 0; bits; c++) bits &= bits - 1; return c; @@ -42,7 +42,7 @@ uint8_t bitpop32(uint32_t bits) { // most significant on-bit - return highest location of on-bit // NOTE: return 0 when bit0 is on or all bits are off -uint8_t biton(uint8_t bits) { +__attribute__((noinline)) uint8_t biton(uint8_t bits) { uint8_t n = 0; if (bits >> 4) { bits >>= 4; @@ -105,7 +105,7 @@ uint8_t biton32(uint32_t bits) { return n; } -uint8_t bitrev(uint8_t bits) { +__attribute__((noinline)) uint8_t bitrev(uint8_t bits) { bits = (bits & 0x0f) << 4 | (bits & 0xf0) >> 4; bits = (bits & 0b00110011) << 2 | (bits & 0b11001100) >> 2; bits = (bits & 0b01010101) << 1 | (bits & 0b10101010) >> 1; |