Skip to content

Commit ab54f31

Browse files
committed
Apply formatting
1 parent d6e9f65 commit ab54f31

34 files changed

+320
-304
lines changed

bsp/audio.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#pragma once
22

3-
#include "esp_err.h"
4-
53
#include <stdbool.h>
64
#include <stdint.h>
5+
#include "esp_err.h"
76

87
// Badge BSP
98
// Audio APIs
@@ -14,7 +13,7 @@ esp_err_t bsp_audio_initialize(void);
1413

1514
/// @brief BSP audio get volume
1615
/// @return ESP-IDF error code
17-
esp_err_t bsp_audio_get_volume(float *out_percentage);
16+
esp_err_t bsp_audio_get_volume(float* out_percentage);
1817

1918
/// @brief BSP audio set volume
2019
/// @return ESP-IDF error code

bsp/battery.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
/// @brief Get whether or not the battery is charging
1111
/// @return ESP-IDF error code
12-
esp_err_t bsp_battery_is_charging(bool *charging);
12+
esp_err_t bsp_battery_is_charging(bool* charging);
1313

1414
/// @brief Get the battery voltage in mV
1515
/// @return ESP-IDF error code
16-
esp_err_t bsp_battery_get_voltage(uint16_t *bat_mv);
16+
esp_err_t bsp_battery_get_voltage(uint16_t* bat_mv);

bsp/device.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#pragma once
22

3-
#include "esp_err.h"
4-
53
#include <stdbool.h>
64
#include <stdint.h>
5+
#include "esp_err.h"
76

87
// Badge BSP
98
// Device related APIs
@@ -22,7 +21,7 @@ esp_err_t bsp_device_initialize(void);
2221
/// @return ESP-IDF error code
2322
/// - ESP_OK if the output string fits in the buffer
2423
/// - ESP_ERR_INVALID_ARG if the output pointer is NULL
25-
esp_err_t bsp_device_get_name(char *output, uint8_t buffer_length);
24+
esp_err_t bsp_device_get_name(char* output, uint8_t buffer_length);
2625

2726
/// @brief Get the name of the manufacturer as a string
2827
/// @details Returns the name as a null terminated string
@@ -31,7 +30,7 @@ esp_err_t bsp_device_get_name(char *output, uint8_t buffer_length);
3130
/// @return ESP-IDF error code
3231
/// - ESP_OK if the output string fits in the buffer
3332
/// - ESP_ERR_INVALID_ARG if the output pointer is NULL
34-
esp_err_t bsp_device_get_manufacturer(char *output, uint8_t buffer_length);
33+
esp_err_t bsp_device_get_manufacturer(char* output, uint8_t buffer_length);
3534

3635
/// @brief Initialized without coprocessor status flag
3736
/// @return Boolean, true when initialized without coprocessor available

bsp/display.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#pragma once
22

3-
#include "esp_err.h"
4-
#include "esp_lcd_types.h"
5-
63
#include <stdbool.h>
74
#include <stdint.h>
5+
#include "esp_err.h"
6+
#include "esp_lcd_types.h"
87

98
// Badge BSP
109
// Display related APIs
@@ -18,7 +17,6 @@ typedef enum {
1817
BSP_DISPLAY_ROTATION_270,
1918
} bsp_display_rotation_t;
2019

21-
2220
/// @brief Initialize the display
2321
/// @details Initialize the display
2422
/// @return ESP-IDF error code
@@ -31,29 +29,29 @@ esp_err_t bsp_display_initialize(void);
3129
/// @return ESP-IDF error code
3230
/// - ESP_OK if succesful
3331
/// - ESP_FAIL if not initialized
34-
esp_err_t bsp_display_get_parameters(size_t *h_res, size_t *v_res, lcd_color_rgb_pixel_format_t *color_fmt);
32+
esp_err_t bsp_display_get_parameters(size_t* h_res, size_t* v_res, lcd_color_rgb_pixel_format_t* color_fmt);
3533

3634
/// @brief Get display panel
3735
/// @details Get display panel
3836
/// @return ESP-IDF error code
3937
/// - ESP_OK if succesful
4038
/// - ESP_FAIL if not initialized
41-
esp_err_t bsp_display_get_panel(esp_lcd_panel_handle_t *panel);
39+
esp_err_t bsp_display_get_panel(esp_lcd_panel_handle_t* panel);
4240

4341
/// @brief Get display panel IO
4442
/// @details Get display panel IO
4543
/// @return ESP-IDF error code
4644
/// - ESP_OK if succesful
4745
/// - ESP_FAIL if not initialized
48-
esp_err_t bsp_display_get_panel_io(esp_lcd_panel_io_handle_t *io);
46+
esp_err_t bsp_display_get_panel_io(esp_lcd_panel_io_handle_t* io);
4947

5048
/// @brief Get the default display rotation
5149
/// @return The default display rotation
5250
bsp_display_rotation_t bsp_display_get_default_rotation();
5351

5452
/// @brief Get display brightness
5553
/// @return ESP-IDF error code
56-
esp_err_t bsp_display_get_backlight_brightness(uint8_t *out_percentage);
54+
esp_err_t bsp_display_get_backlight_brightness(uint8_t* out_percentage);
5755

5856
/// @brief Set display brightness
5957
/// @return ESP-IDF error code

bsp/i2c.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#pragma once
22

3+
#include <stdbool.h>
4+
#include <stdint.h>
35
#include "driver/i2c_master.h"
46
#include "esp_err.h"
57
#include "freertos/FreeRTOS.h"
68
#include "freertos/semphr.h"
79

8-
#include <stdbool.h>
9-
#include <stdint.h>
10-
1110
// Badge BSP
1211
// I2C APIs
1312

@@ -17,11 +16,11 @@ esp_err_t bsp_i2c_primary_bus_initialize(void);
1716

1817
/// @brief Get the primary I2C bus handle
1918
/// @return ESP-IDF error code
20-
esp_err_t bsp_i2c_primary_bus_get_handle(i2c_master_bus_handle_t *handle);
19+
esp_err_t bsp_i2c_primary_bus_get_handle(i2c_master_bus_handle_t* handle);
2120

2221
/// @brief Get the primary I2C bus concurrency semaphore handle
2322
/// @return ESP-IDF error code
24-
esp_err_t bsp_i2c_primary_bus_get_semaphore(SemaphoreHandle_t *semaphore);
23+
esp_err_t bsp_i2c_primary_bus_get_semaphore(SemaphoreHandle_t* semaphore);
2524

2625
/// @brief Claim private access to the primary I2C bus
2726
/// @return ESP-IDF error code

bsp/input.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#pragma once
22

3+
#include <stdbool.h>
4+
#include <stdint.h>
35
#include "esp_err.h"
46
#include "freertos/FreeRTOS.h"
57
#include "freertos/queue.h"
68

7-
#include <stdbool.h>
8-
#include <stdint.h>
9-
109
typedef enum _bsp_input_event_type {
1110
INPUT_EVENT_TYPE_NONE = 0,
1211
INPUT_EVENT_TYPE_NAVIGATION = 1,
@@ -34,7 +33,6 @@ typedef enum _bsp_input_navigation_key {
3433
BSP_INPUT_NAVIGATION_KEY_TAB,
3534
BSP_INPUT_NAVIGATION_KEY_BACKSPACE,
3635

37-
3836
// Function keys
3937
BSP_INPUT_NAVIGATION_KEY_F1,
4038
BSP_INPUT_NAVIGATION_KEY_F2,
@@ -92,7 +90,7 @@ typedef struct _bsp_input_event_args_navigation {
9290

9391
typedef struct _bsp_input_event_args_keyboard {
9492
char ascii;
95-
char const *utf8;
93+
char const* utf8;
9694
uint32_t modifiers;
9795
} bsp_input_event_args_keyboard_t;
9896

@@ -116,15 +114,15 @@ esp_err_t bsp_input_initialize(void);
116114

117115
/// @brief Get the queue handle for the input event queue
118116
/// @return ESP-IDF error code
119-
esp_err_t bsp_input_get_queue(QueueHandle_t *out_queue);
117+
esp_err_t bsp_input_get_queue(QueueHandle_t* out_queue);
120118

121119
/// @brief Get whether or not the device needs an on-screen keyboard
122120
/// @return true if the device needs an on-screen keyboard and false if it does not
123121
bool needs_on_screen_keyboard();
124122

125123
/// @brief Get keyboard backlight brightness
126124
/// @return ESP-IDF error code
127-
esp_err_t bsp_input_get_backlight_brightness(uint8_t *out_percentage);
125+
esp_err_t bsp_input_get_backlight_brightness(uint8_t* out_percentage);
128126

129127
/// @brief Set keyboard backlight brightness
130128
/// @return ESP-IDF error code

bsp/led.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#pragma once
22

3-
#include "esp_err.h"
4-
53
#include <stdbool.h>
64
#include <stdint.h>
5+
#include "esp_err.h"
76

87
// Badge BSP
98
// LED APIs
@@ -14,4 +13,4 @@ esp_err_t bsp_led_initialize(void);
1413

1514
/// @brief Write data to LEDs
1615
/// @return ESP-IDF error code
17-
esp_err_t bsp_led_write(uint8_t *data, uint32_t length);
16+
esp_err_t bsp_led_write(uint8_t* data, uint32_t length);

bsp/mch2022.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
/// @brief Get coprocessor handle
1111
/// @return ESP-IDF error code
12-
esp_err_t bsp_mch2022_coprocessor_get_handle(RP2040 *handle);
12+
esp_err_t bsp_mch2022_coprocessor_get_handle(RP2040* handle);
1313

1414
/// @brief Get coprocessor input queue
1515
/// @return ESP-IDF error code
16-
esp_err_t bsp_mch2022_coprocessor_get_queue(QueueHandle_t *queue);
16+
esp_err_t bsp_mch2022_coprocessor_get_queue(QueueHandle_t* queue);
1717

1818
/// @brief Coprocessor input callback
1919
void bsp_mch2022_coprocessor_input_callback(rp2040_input_t input, bool state);

bsp/power.h

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#pragma once
22

3-
#include "esp_err.h"
4-
53
#include <stdbool.h>
64
#include <stdint.h>
5+
#include "esp_err.h"
76

87
typedef enum {
98
BSP_POWER_CHARGING_FAULT_NONE = 0,
@@ -13,16 +12,16 @@ typedef enum {
1312
} bsp_power_charging_fault_t;
1413

1514
typedef struct _bsp_power_battery_information {
16-
char const *type; // Battery type (string)
17-
bool power_supply_available; // Is a power supply attached
18-
bool battery_available; // Is a battery installed
19-
bool charging_disabled; // Is battery charging disabled
20-
bool battery_charging; // Is the battery being charged
21-
uint16_t maximum_charging_current; // Maximum charging current (mA)
22-
uint16_t current_charging_current; // Maximum charging current (mA)
23-
uint16_t voltage; // Current battery voltage
24-
uint16_t charging_target_voltage; // Target voltage when full
25-
double remaining_percentage; // Remaining capacity (%)
15+
char const* type; // Battery type (string)
16+
bool power_supply_available; // Is a power supply attached
17+
bool battery_available; // Is a battery installed
18+
bool charging_disabled; // Is battery charging disabled
19+
bool battery_charging; // Is the battery being charged
20+
uint16_t maximum_charging_current; // Maximum charging current (mA)
21+
uint16_t current_charging_current; // Maximum charging current (mA)
22+
uint16_t voltage; // Current battery voltage
23+
uint16_t charging_target_voltage; // Target voltage when full
24+
double remaining_percentage; // Remaining capacity (%)
2625
} bsp_power_battery_information_t;
2726

2827
typedef enum {
@@ -37,39 +36,39 @@ esp_err_t bsp_power_initialize(void);
3736

3837
/// @brief Get battery information
3938
/// @return ESP-IDF error code
40-
esp_err_t bsp_power_get_battery_information(bsp_power_battery_information_t *out_information);
39+
esp_err_t bsp_power_get_battery_information(bsp_power_battery_information_t* out_information);
4140

4241
/// @brief Get battery voltage
4342
/// @return ESP-IDF error code
44-
esp_err_t bsp_power_get_battery_voltage(uint16_t *out_millivolt);
43+
esp_err_t bsp_power_get_battery_voltage(uint16_t* out_millivolt);
4544

4645
/// @brief Get system voltage
4746
/// @return ESP-IDF error code
48-
esp_err_t bsp_power_get_system_voltage(uint16_t *out_millivolt);
47+
esp_err_t bsp_power_get_system_voltage(uint16_t* out_millivolt);
4948

5049
/// @brief Get charger input voltage
5150
/// @return ESP-IDF error code
52-
esp_err_t bsp_power_get_input_voltage(uint16_t *out_millivolt);
51+
esp_err_t bsp_power_get_input_voltage(uint16_t* out_millivolt);
5352

5453
/// @brief Get battery charger configuration
5554
/// @return ESP-IDF error code
56-
esp_err_t bsp_power_get_charging_configuration(bool *out_disabled, uint16_t *out_current);
55+
esp_err_t bsp_power_get_charging_configuration(bool* out_disabled, uint16_t* out_current);
5756

5857
/// @brief Configure battery charger
5958
/// @return ESP-IDF error code
6059
esp_err_t bsp_power_configure_charging(bool disable, uint16_t current);
6160

6261
/// @brief Get USB host port boost enabled
6362
/// @return ESP-IDF error code
64-
esp_err_t bsp_power_get_usb_host_boost_enabled(bool *out_enabled);
63+
esp_err_t bsp_power_get_usb_host_boost_enabled(bool* out_enabled);
6564

6665
/// @brief Set USB host port boost enabled
6766
/// @return ESP-IDF error code
6867
esp_err_t bsp_power_set_usb_host_boost_enabled(bool enable);
6968

7069
/// @brief Get radio enabled
7170
/// @return ESP-IDF error code
72-
esp_err_t bsp_power_get_radio_state(bsp_radio_state_t *out_state);
71+
esp_err_t bsp_power_get_radio_state(bsp_radio_state_t* out_state);
7372

7473
/// @brief Set radio enabled
7574
/// @return ESP-IDF error code

bsp/rtc.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
#pragma once
22

3-
#include "esp_err.h"
4-
53
#include <stdbool.h>
64
#include <stdint.h>
5+
#include "esp_err.h"
76

87
// Badge BSP
98
// Real Time Clock APIs
109

1110
/// @brief Get time
1211
/// @return ESP-IDF error code
13-
esp_err_t bsp_rtc_get_time(uint32_t *value);
12+
esp_err_t bsp_rtc_get_time(uint32_t* value);
1413

1514
/// @brief Set time
1615
/// @return ESP-IDF error code
@@ -22,7 +21,7 @@ esp_err_t bsp_rtc_update_time(void);
2221

2322
/// @brief Get alarm
2423
/// @return ESP-IDF error code
25-
esp_err_t bsp_rtc_get_alarm(uint32_t *value);
24+
esp_err_t bsp_rtc_get_alarm(uint32_t* value);
2625

2726
/// @brief Set alarm
2827
/// @return ESP-IDF error code

0 commit comments

Comments
 (0)