Add void to function declarations with no args

SDCC 4.3.3 complains about the declaration not matching the prototype:

    error 283: function declarator with no prototype

Add `void` to the AVR functions as well, even though no warning is
issued by GCC.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2023-10-13 15:49:20 -06:00
committed by Jeremy Soller
parent 01be30f107
commit 713e1d9681
25 changed files with 25 additions and 25 deletions

View File

@ -40,7 +40,7 @@ void i2c_slave_init(
sei();
}
void i2c_slave_stop() {
void i2c_slave_stop(void) {
// clear interrupts
cli();

View File

@ -9,6 +9,6 @@ void i2c_slave_init(
void (*recv_cb)(uint8_t),
uint8_t (*send_cb)()
);
void i2c_slave_stop();
void i2c_slave_stop(void);
#endif // _ARCH_I2C_SLAVE_H

View File

@ -21,7 +21,7 @@ struct Uart {
void uart_init(struct Uart *uart, uint32_t baud);
int16_t uart_count();
int16_t uart_count(void);
struct Uart *uart_new(int16_t num);
uint8_t uart_can_read(struct Uart *uart);

View File

@ -42,7 +42,7 @@
#endif
// clang-format on
int16_t uart_count() {
int16_t uart_count(void) {
return sizeof(UARTS) / sizeof(struct Uart);
}

View File

@ -44,7 +44,7 @@ struct Gpio __code WLAN_EN = GPIO(J, 2);
struct Gpio __code WLAN_PWR_EN = GPIO(B, 0);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;

View File

@ -42,7 +42,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(J, 7);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -34,7 +34,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(D, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -41,7 +41,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4); // renamed to EN_3V
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -36,7 +36,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(B, 5);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -45,7 +45,7 @@ struct Gpio __code WLAN_EN = GPIO(H, 5);
struct Gpio __code WLAN_PWR_EN = GPIO(J, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;

View File

@ -42,7 +42,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -44,7 +44,7 @@ struct Gpio __code WLAN_EN = GPIO(H, 5);
struct Gpio __code WLAN_PWR_EN = GPIO(J, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;

View File

@ -43,7 +43,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -40,7 +40,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -38,7 +38,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -39,7 +39,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -38,7 +38,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -38,7 +38,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(D, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -35,7 +35,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// Not documented
//GCR22 = BIT(7);
GCR10 = 0x02;

View File

@ -41,7 +41,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -42,7 +42,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Enable SMBus channel 4

View File

@ -36,7 +36,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(D, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -40,7 +40,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -39,7 +39,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(H, 4);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1

View File

@ -37,7 +37,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(H, 4);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on
void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1