Put function curlies into their own line according to our coding standards all across the codebase.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#include "led_pwm.h"
|
||||
#include "fsl_port.h"
|
||||
|
||||
void LedPwm_Init(void) {
|
||||
void LedPwm_Init(void)
|
||||
{
|
||||
CLOCK_EnableClock(LED_PWM_CLOCK);
|
||||
PORT_SetPinMux(LED_PWM_PORT, LED_PWM_PIN, kPORT_MuxAlt2);
|
||||
|
||||
|
||||
@@ -1,31 +1,37 @@
|
||||
#include "basic_types.h"
|
||||
|
||||
uint8_t readUInt8(config_buffer_t *buffer) {
|
||||
uint8_t readUInt8(config_buffer_t *buffer)
|
||||
{
|
||||
return buffer->buffer[buffer->offset++];
|
||||
}
|
||||
|
||||
uint16_t readUInt16(config_buffer_t *buffer) {
|
||||
uint16_t readUInt16(config_buffer_t *buffer)
|
||||
{
|
||||
uint16_t uInt16 = readUInt8(buffer);
|
||||
|
||||
uInt16 |= readUInt8(buffer) << 8;
|
||||
return uInt16;
|
||||
}
|
||||
|
||||
int16_t readInt16(config_buffer_t *buffer) {
|
||||
int16_t readInt16(config_buffer_t *buffer)
|
||||
{
|
||||
return readUInt16(buffer);
|
||||
}
|
||||
|
||||
bool readBool(config_buffer_t *buffer) {
|
||||
bool readBool(config_buffer_t *buffer)
|
||||
{
|
||||
return readUInt8(buffer);
|
||||
}
|
||||
|
||||
uint16_t readCompactLength(config_buffer_t *buffer) {
|
||||
uint16_t readCompactLength(config_buffer_t *buffer)
|
||||
{
|
||||
uint16_t compactLength = readUInt8(buffer);
|
||||
|
||||
return compactLength == 0xFF ? readUInt16(buffer) : compactLength;
|
||||
}
|
||||
|
||||
const char *readString(config_buffer_t *buffer, uint16_t *len) {
|
||||
const char *readString(config_buffer_t *buffer, uint16_t *len)
|
||||
{
|
||||
const char *string;
|
||||
|
||||
*len = readCompactLength(buffer);
|
||||
|
||||
@@ -45,7 +45,8 @@ static const uint16_t digitToSegmentSet[] = {
|
||||
0b0000000011101111,
|
||||
};
|
||||
|
||||
static uint16_t characterToSegmentSet(char character) {
|
||||
static uint16_t characterToSegmentSet(char character)
|
||||
{
|
||||
switch (character) {
|
||||
case 'A' ... 'Z':
|
||||
return capitalLetterToSegmentSet[character - 'A'];
|
||||
@@ -55,7 +56,8 @@ static uint16_t characterToSegmentSet(char character) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void LedDisplay_SetText(uint8_t length, const char* text) {
|
||||
void LedDisplay_SetText(uint8_t length, const char* text)
|
||||
{
|
||||
uint64_t allSegmentSets = 0;
|
||||
|
||||
switch (length) {
|
||||
@@ -85,7 +87,8 @@ void LedDisplay_SetCurrentKeymapText(void)
|
||||
LedDisplay_SetText(currentKeymap->abbreviationLen, currentKeymap->abbreviation);
|
||||
}
|
||||
|
||||
void LedDisplay_SetLayer(uint8_t layerId) {
|
||||
void LedDisplay_SetLayer(uint8_t layerId)
|
||||
{
|
||||
for (uint8_t i = 13; i <= 45; i += 16) {
|
||||
LedDriverValues[LedDriverId_Left][i] = 0;
|
||||
}
|
||||
@@ -95,6 +98,7 @@ void LedDisplay_SetLayer(uint8_t layerId) {
|
||||
}
|
||||
}
|
||||
|
||||
void LedDisplay_SetIcon(led_display_icon_t icon, bool isEnabled) {
|
||||
void LedDisplay_SetIcon(led_display_icon_t icon, bool isEnabled)
|
||||
{
|
||||
LedDriverValues[LedDriverId_Left][8 + icon] = isEnabled ? LED_BRIGHTNESS_LEVEL : 0;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "led_pwm.h"
|
||||
#include "fsl_port.h"
|
||||
|
||||
void LedPwm_Init(void) {
|
||||
void LedPwm_Init(void)
|
||||
{
|
||||
CLOCK_EnableClock(LED_PWM_CLOCK);
|
||||
PORT_SetPinMux(LED_PWM_PORT, LED_PWM_PIN, kPORT_MuxAlt4);
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "merge_sensor.h"
|
||||
#include "fsl_port.h"
|
||||
|
||||
void InitMergeSensor(void) {
|
||||
void InitMergeSensor(void)
|
||||
{
|
||||
CLOCK_EnableClock(MERGE_SENSOR_CLOCK);
|
||||
PORT_SetPinConfig(MERGE_SENSOR_PORT, MERGE_SENSOR_PIN,
|
||||
&(port_pin_config_t){.pullSelect=kPORT_PullUp, .mux=kPORT_MuxAsGpio});
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "reset_button.h"
|
||||
#include "fsl_port.h"
|
||||
|
||||
void InitResetButton(void) {
|
||||
void InitResetButton(void)
|
||||
{
|
||||
CLOCK_EnableClock(RESET_BUTTON_CLOCK);
|
||||
PORT_SetPinConfig(RESET_BUTTON_PORT, RESET_BUTTON_PIN,
|
||||
&(port_pin_config_t){.pullSelect=kPORT_PullUp, .mux=kPORT_MuxAsGpio});
|
||||
|
||||
@@ -61,7 +61,8 @@ static uint8_t setShutdownModeNormalBuffer[] = {LED_DRIVER_REGISTER_SHUTDOWN, SH
|
||||
static uint8_t setFrame1Buffer[] = {LED_DRIVER_REGISTER_FRAME, LED_DRIVER_FRAME_1};
|
||||
static uint8_t updatePwmRegistersBuffer[PWM_REGISTER_BUFFER_LENGTH];
|
||||
|
||||
void LedSlaveDriver_Init(uint8_t ledDriverId) {
|
||||
void LedSlaveDriver_Init(uint8_t ledDriverId)
|
||||
{
|
||||
if (ledDriverId == ISO_KEY_LED_DRIVER_ID && IS_ISO) {
|
||||
ledDriverStates[LedDriverId_Left].setupLedControlRegistersCommand[ISO_KEY_CONTROL_REGISTER_POS] |= 1 << ISO_KEY_CONTROL_REGISTER_BIT;
|
||||
}
|
||||
@@ -73,7 +74,8 @@ void LedSlaveDriver_Init(uint8_t ledDriverId) {
|
||||
LedDisplay_SetCurrentKeymapText();
|
||||
}
|
||||
|
||||
status_t LedSlaveDriver_Update(uint8_t ledDriverId) {
|
||||
status_t LedSlaveDriver_Update(uint8_t ledDriverId)
|
||||
{
|
||||
status_t status = kStatus_Uhk_IdleSlave;
|
||||
uint8_t *ledValues = LedDriverValues[ledDriverId];
|
||||
led_driver_state_t *currentLedDriverState = ledDriverStates + ledDriverId;
|
||||
|
||||
Reference in New Issue
Block a user