Skip to content

Commit

Permalink
more missing-prototypes fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jepler committed Nov 11, 2021
1 parent ebc8359 commit 340d6b9
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions ports/atmel-samd/common-hal/alarm/SleepMemory.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include "py/runtime.h"
#include "common-hal/alarm/SleepMemory.h"
#include "shared-bindings/alarm/SleepMemory.h"
#include "shared-bindings/nvm/ByteArray.h"

void alarm_sleep_memory_reset(void) {
Expand Down
8 changes: 2 additions & 6 deletions ports/atmel-samd/supervisor/internal_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ void port_internal_flash_flush(void) {
void supervisor_flash_release_cache(void) {
}

void flash_flush(void) {
supervisor_flash_flush();
}

static int32_t convert_block_to_flash_addr(uint32_t block) {
if (0 <= block && block < INTERNAL_FLASH_PART1_NUM_BLOCKS) {
// a block in partition 1
Expand All @@ -91,7 +87,7 @@ static int32_t convert_block_to_flash_addr(uint32_t block) {
return -1;
}

bool supervisor_flash_read_block(uint8_t *dest, uint32_t block) {
STATIC bool supervisor_flash_read_block(uint8_t *dest, uint32_t block) {
// non-MBR block, get data from flash memory
int32_t src = convert_block_to_flash_addr(block);
if (src == -1) {
Expand All @@ -102,7 +98,7 @@ bool supervisor_flash_read_block(uint8_t *dest, uint32_t block) {
return error_code == ERR_NONE;
}

bool supervisor_flash_write_block(const uint8_t *src, uint32_t block) {
STATIC bool supervisor_flash_write_block(const uint8_t *src, uint32_t block) {
// non-MBR block, copy to cache
int32_t dest = convert_block_to_flash_addr(block);
if (dest == -1) {
Expand Down
1 change: 1 addition & 0 deletions ports/espressif/boards/ai_thinker_esp32-c3s/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*/

#include "shared-bindings/microcontroller/Pin.h"
#include "supervisor/board.h"

void board_init(void) {

Expand Down
3 changes: 3 additions & 0 deletions ports/espressif/boards/microdev_micro_c3/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*/

#include "shared-bindings/microcontroller/Pin.h"
#include "supervisor/board.h"

void board_init(void) {
// USB
Expand Down Expand Up @@ -54,5 +55,7 @@ bool board_requests_safe_mode(void) {
void reset_board(void) {
}

#if CIRCUITPY_ALARM
void board_deinit(void) {
}
#endif
2 changes: 2 additions & 0 deletions ports/nrf/device/nrf52/startup_nrf52833.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ typedef void (*func)(void);

extern void _start(void) __attribute__((noreturn));
extern void SystemInit(void);
extern void Default_Handler(void);
extern void Reset_Handler(void);

void Default_Handler(void) {
while (1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "shared-bindings/microcontroller/Pin.h"
#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h"
#include "supervisor/shared/board.h"
#include "supervisor/board.h"

void board_init(void) {
}
Expand Down
1 change: 1 addition & 0 deletions shared-module/gamepadshift/GamePadShift.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "py/mpstate.h"
#include "shared-bindings/digitalio/DigitalInOut.h"
#include "shared-bindings/gamepadshift/GamePadShift.h"
#include "shared-module/gamepadshift/GamePadShift.h"
#include "supervisor/shared/tick.h"

Expand Down

0 comments on commit 340d6b9

Please sign in to comment.