Skip to content

Commit

Permalink
Merge pull request #350 from aabadie/clean_headers
Browse files Browse the repository at this point in the history
treewide: cleanup header includes
  • Loading branch information
aabadie authored Jan 8, 2025
2 parents 9d472fa + d819041 commit 1cfacba
Show file tree
Hide file tree
Showing 107 changed files with 93 additions and 237 deletions.
2 changes: 1 addition & 1 deletion bsp/lh2.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
* @}
*/

#include <nrf.h>
#include <stdint.h>
#include <stdbool.h>
#include <nrf.h>

#include "gpio.h"

Expand Down
3 changes: 1 addition & 2 deletions bsp/nrf/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
*
* @copyright Inria, 2022
*/
#include <stdio.h>
#include <stdlib.h>

#include <nrf.h>

#include "board.h"
Expand Down
1 change: 0 additions & 1 deletion bsp/nrf/lh2_default.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <nrf.h>
Expand Down
6 changes: 2 additions & 4 deletions bsp/nrf/lh2_nrf5340_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ void db_lh2_init(db_lh2_t *lh2, const gpio_t *gpio_d, const gpio_t *gpio_e) {
(void)gpio_e;
}

void db_lh2_start(db_lh2_t *lh2) {
(void)lh2;
void db_lh2_start(void) {
}

void db_lh2_stop(db_lh2_t *lh2) {
(void)lh2;
void db_lh2_stop(void) {
}

void db_lh2_reset(db_lh2_t *lh2) {
Expand Down
3 changes: 2 additions & 1 deletion bsp/nrf/nvmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
#include <stdint.h>
#include <string.h>

#include "nrf.h"
#include <nrf.h>

#include "nvmc.h"

//=========================== defines =========================================
Expand Down
4 changes: 1 addition & 3 deletions bsp/nrf/partition.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
* @copyright Inria, 2023
*/

#include <assert.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>

#include "nrf.h"
#include <nrf.h>
#include "nvmc.h"
#include "partition.h"

Expand Down
3 changes: 0 additions & 3 deletions bsp/nrf/pwm_nrf5340_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
* @copyright Inria, 2022
*/

#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <nrf.h>

#include "gpio.h"

Expand Down
5 changes: 2 additions & 3 deletions bsp/nrf/qdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
*
* @copyright Inria, 2023
*/
#include <nrf.h>
#include <nrf_peripherals.h>
#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <nrf.h>
#include <nrf_peripherals.h>
#include "gpio.h"
#include "qdec.h"

Expand Down
2 changes: 0 additions & 2 deletions bsp/nrf/qspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
* @copyright Inria, 2024-present
*/

#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <nrf.h>

#include "clock.h"
Expand Down
6 changes: 1 addition & 5 deletions bsp/nrf/radio_nrf5340_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@
*
* @copyright Inria, 2022
*/
#include <nrf.h>
#include <stdint.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <nrf.h>

#include "clock.h"
#include "ipc.h"
#include "radio.h"
#include "timer_hf.h"
#include "tz.h"

//=========================== variables ========================================
Expand Down
2 changes: 0 additions & 2 deletions bsp/nrf/rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*
* @copyright Inria, 2023
*/
#include <nrf.h>
#include <stdint.h>

#if defined(NRF5340_XXAA) && defined(NRF_APPLICATION)
#include "rng_nrf5340_app.c"
Expand Down
3 changes: 1 addition & 2 deletions bsp/nrf/rng_nrf5340_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
*
* @copyright Inria, 2023
*/
#include <nrf.h>
#include <stdbool.h>
#include <stdint.h>
#include <nrf.h>

#include "ipc.h"
#include "rng.h"
Expand Down
2 changes: 0 additions & 2 deletions bsp/nrf/rpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
* @copyright Inria, 2022
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <nrf.h>
#include "board_config.h"
#include "rpm.h"
Expand Down
4 changes: 2 additions & 2 deletions bsp/nrf/saadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
*
* @copyright Inria, 2023
*/
#include <nrf.h>
#include <nrf_peripherals.h>
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <nrf.h>
#include <nrf_peripherals.h>
#include "saadc.h"

//=========================== defines ==========================================
Expand Down
1 change: 0 additions & 1 deletion bsp/nrf/spim.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* @copyright Inria, 2024-present
*/

#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
Expand Down
5 changes: 3 additions & 2 deletions bsp/nrf/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
*
* @copyright Inria, 2022
*/
#include <nrf.h>
#include <nrf_peripherals.h>

#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <nrf.h>
#include <nrf_peripherals.h>
#include "clock.h"
#include "timer.h"

Expand Down
4 changes: 2 additions & 2 deletions bsp/nrf/timer_hf.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
*
* @copyright Inria, 2022
*/
#include <nrf.h>
#include <nrf_peripherals.h>
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <nrf.h>
#include <nrf_peripherals.h>
#include "clock.h"
#include "timer_hf.h"

Expand Down
3 changes: 2 additions & 1 deletion bsp/nrf/wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
*
* @copyright Inria, 2024
*/
#include <nrf.h>

#include <stdint.h>
#include <nrf.h>

#include "wdt.h"

Expand Down
1 change: 0 additions & 1 deletion bsp/partition.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/

#include <stdint.h>
#include <string.h>

#include <nrf.h>

Expand Down
4 changes: 3 additions & 1 deletion bsp/pwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@

#include <stdint.h>
#include <stdlib.h>

#include <nrf.h>

#include "gpio.h"
#include "nrf.h"

//=========================== defines ==========================================

Expand Down
2 changes: 1 addition & 1 deletion bsp/qdec.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* @}
*/

#include <nrf.h>
#include <stdint.h>
#include <nrf.h>
#include "gpio.h"

//=========================== defines ==========================================
Expand Down
2 changes: 1 addition & 1 deletion bsp/saadc.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* @}
*/

#include <nrf.h>
#include <stdint.h>
#include <nrf.h>

typedef enum {
DB_SAADC_RESOLUTION_8BIT = SAADC_RESOLUTION_VAL_8bit, ///< 8-bit resolution
Expand Down
2 changes: 0 additions & 2 deletions bsp/timer_hf.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
*/

#include <stdint.h>
#include <nrf.h>
#include <nrf_peripherals.h>

//=========================== defines ==========================================

Expand Down
2 changes: 1 addition & 1 deletion crypto/ed25519.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

#include <nrf.h>
#include "ed25519.h"
#include "utils.h"

#if defined(USE_CRYPTOCELL)
#include "nrf_cc310/include/crys_ec_edw_api.h"
#include "utils.h"
#else
#include "soft_edsign.h"
#endif
Expand Down
2 changes: 1 addition & 1 deletion crypto/sha256.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

#include <nrf.h>
#include "sha256.h"
#include "utils.h"

#if defined(USE_CRYPTOCELL)
#include "utils.h"
#include "nrf_cc310/include/crys_hash.h"

static CRYS_HASHUserContext_t _hash_context;
Expand Down
4 changes: 0 additions & 4 deletions crypto/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
* @}
*/

#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>

#include <nrf.h>

//=========================== defines ==========================================
Expand Down
1 change: 0 additions & 1 deletion drv/as5048b.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/

#include <stdint.h>
#include <stdlib.h>
#include <nrf.h>

/**
Expand Down
4 changes: 1 addition & 3 deletions drv/as5048b/as5048b.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
*
*/

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>

// Include BSP packages
#include "board_config.h"
#include "gpio.h"
#include "i2c.h"
#include "as5048b.h"

Expand Down
36 changes: 18 additions & 18 deletions drv/drv.emProject
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,6 @@
<file file_name="motors/motors.c" />
<file file_name="motors.h" />
</project>
<project Name="00drv_tdma_client">
<configuration
Name="Common"
project_dependencies="00bsp_radio(bsp);00bsp_timer_hf(bsp);00bsp_rng(bsp);00drv_dotbot_protocol(drv)"
project_directory="tdma_client"
project_type="Library" />
<file file_name="tdma_client.c" />
<file file_name="../tdma_client.h" />
</project>
<project Name="00drv_tdma_server">
<configuration
Name="Common"
project_dependencies="00bsp_radio(bsp);00bsp_timer_hf(bsp);00drv_dotbot_protocol(drv)"
project_directory="tdma_server"
project_type="Library" />
<file file_name="tdma_server.c" />
<file file_name="../tdma_server.h" />
</project>
<project Name="00drv_move">
<configuration
Name="Common"
Expand Down Expand Up @@ -174,6 +156,24 @@
<file file_name="rgbled_pwm.c" />
<file file_name="../rgbled_pwm.h" />
</project>
<project Name="00drv_tdma_client">
<configuration
Name="Common"
project_dependencies="00bsp_radio(bsp);00bsp_timer_hf(bsp);00bsp_rng(bsp);00drv_dotbot_protocol(drv)"
project_directory="tdma_client"
project_type="Library" />
<file file_name="tdma_client.c" />
<file file_name="../tdma_client.h" />
</project>
<project Name="00drv_tdma_server">
<configuration
Name="Common"
project_dependencies="00bsp_radio(bsp);00bsp_timer_hf(bsp);00drv_dotbot_protocol(drv)"
project_directory="tdma_server"
project_type="Library" />
<file file_name="tdma_server.c" />
<file file_name="../tdma_server.h" />
</project>
<project Name="00drv_upgate">
<configuration
Name="Common"
Expand Down
1 change: 0 additions & 1 deletion drv/hdlc/hdlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "hdlc.h"

//=========================== definitions ======================================
Expand Down
2 changes: 0 additions & 2 deletions drv/ism330.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
* @}
*/

#include <stdint.h>
#include <stdlib.h>
#include <nrf.h>
#include "gpio.h"

Expand Down
Loading

0 comments on commit 1cfacba

Please sign in to comment.