/*
 * Copyright 2017-2024 Oleg Borodin <onborodin@gmail.com>
 *
 */
#ifndef TOOLS_H_QWERTY
#define TOOLS_H_QWERTY

#define MAX_LINE_LEN 1024

#define REG_SETUP_BIT(reg, bit)    (reg) |= (1 << (bit))
#define REG_SETDOWN_BIT(reg, bit)  (reg) &= ~(1 << (bit))
#define REG_BIT_ISUP(reg, bit)     ((reg) & (1 << (bit)))
#define REG_SETVAL(reg, value)     ((reg) = (value))

#define REG_SETUP(reg, value)      ((reg) |= (value))
#define REG_SETDOWN(reg, value)    ((reg) &= ~(value))
#define REG_BIT_VALUE(reg, value)  ((reg) & (1 << (value)))

#define BIT(bit)  (1 << (bit))

uint16_t str_len(uint8_t * str);

#endif
