altos: Declare all public functions in header files
authorKeith Packard <keithp@keithp.com>
Tue, 5 Feb 2019 06:28:02 +0000 (22:28 -0800)
committerKeith Packard <keithp@keithp.com>
Mon, 18 Feb 2019 21:08:23 +0000 (13:08 -0800)
Including interrupt vectors to catch mis-spellings.
Working toward supporting -Wmissing-prototypes

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_log_gps.h
src/kernel/ao_send_packet.c
src/lpc/ao_arch_funcs.h
src/lpc/lpc.h
src/stm/ao_adc_single_stm.c
src/stm/ao_arch_funcs.h
src/stm/ao_beep_stm.c
src/stm/stm32l.h
src/stmf0/ao_arch_funcs.h
src/stmf0/stm32f0.h

index cc947d6e8c634f2b2a404ba33705e2449abe7e32..096c8383e7da70271147e7ce6c5e4a53ab5bdf0f 100644 (file)
@@ -28,4 +28,7 @@ ao_log_gps_flight(void);
 void
 ao_log_gps_data(uint16_t tick, struct ao_telemetry_location *gps_data);
 
 void
 ao_log_gps_data(uint16_t tick, struct ao_telemetry_location *gps_data);
 
+void
+ao_log_gps_tracking(uint16_t tick, struct ao_telemetry_satellite *gps_tracking_data);
+
 #endif /* _AO_LOG_GPS_H_ */
 #endif /* _AO_LOG_GPS_H_ */
index cae25151f4db99077a061123f2bb69792bba3c3a..ee4685998215a7899f123caf2780abc88ebdc00a 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "ao.h"
  */
 
 #include "ao.h"
+#include "ao_send_packet.h"
 
 #define AO_MAX_SEND    128
 
 
 #define AO_MAX_SEND    128
 
index 0454b38b012e71f80d1dae78928dbe549579229e..a5c78c33eb8d16c6cc10c49f3ec24adac72bf20f 100644 (file)
@@ -258,6 +258,9 @@ static inline void ao_spi_send_byte(uint8_t byte, uint8_t spi_index)
                }                                                       \
        } while (0)
 
                }                                                       \
        } while (0)
 
+void
+ao_debug_out(char c);
+
 #define HAS_ARCH_START_SCHEDULER       1
 
 static inline void ao_arch_start_scheduler(void) {
 #define HAS_ARCH_START_SCHEDULER       1
 
 static inline void ao_arch_start_scheduler(void) {
@@ -272,4 +275,6 @@ static inline void ao_arch_start_scheduler(void) {
        asm("isb");
 }
 
        asm("isb");
 }
 
+void start(void);
+
 #endif /* _AO_ARCH_FUNCS_H_ */
 #endif /* _AO_ARCH_FUNCS_H_ */
index 38dd2aeedb2c222e4351c9d287ff393c736c0772..1d02e2e29dc2f71762d016928705493ea7c4af98 100644 (file)
@@ -1347,4 +1347,48 @@ extern struct lpc_ct32b lpc_ct32b0, lpc_ct32b1;
 #define LPC_CT32B_EMR_EMC_SET          2
 #define LPC_CT32B_EMR_EMC_TOGGLE       3
 
 #define LPC_CT32B_EMR_EMC_SET          2
 #define LPC_CT32B_EMR_EMC_TOGGLE       3
 
+#define isr_decl(name) \
+       void __attribute__ ((weak)) lpc_ ## name ## _isr(void);
+
+isr_decl(nmi)
+isr_decl(hardfault)
+isr_decl(memmanage)
+isr_decl(busfault)
+isr_decl(usagefault)
+isr_decl(svc)
+isr_decl(debugmon)
+isr_decl(pendsv)
+isr_decl(systick)
+
+isr_decl(pin_int0)     /* IRQ0 */
+isr_decl(pin_int1)
+isr_decl(pin_int2)
+isr_decl(pin_int3)
+isr_decl(pin_int4)     /* IRQ4 */
+isr_decl(pin_int5)
+isr_decl(pin_int6)
+isr_decl(pin_int7)
+
+isr_decl(gint0)        /* IRQ8 */
+isr_decl(gint1)
+isr_decl(ssp1)
+isr_decl(i2c)
+
+isr_decl(ct16b0)       /* IRQ16 */
+isr_decl(ct16b1)
+isr_decl(ct32b0)
+isr_decl(ct32b1)
+isr_decl(ssp0) /* IRQ20 */
+isr_decl(usart)
+isr_decl(usb_irq)
+isr_decl(usb_fiq)
+
+isr_decl(adc)  /* IRQ24 */
+isr_decl(wwdt)
+isr_decl(bod)
+isr_decl(flash)
+
+isr_decl(usb_wakeup)
+
+
 #endif /* _LPC_H_ */
 #endif /* _LPC_H_ */
index 5737cd50cf02acdc972a05f012d331406d3f19dd..c3a332f4f19dd58bc97e6f3c3880f2bb3c5947e1 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <ao.h>
 #include <ao_data.h>
 
 #include <ao.h>
 #include <ao_data.h>
+#include <ao_adc_single.h>
 
 static uint8_t                 ao_adc_ready;
 
 
 static uint8_t                 ao_adc_ready;
 
index 7fe6a732478b442f1b9ce445f7cb253d01cadd88..41f1bf9113721217516c8a62ab0c6fb66a810996 100644 (file)
@@ -393,6 +393,9 @@ struct ao_stm_usart {
 #endif
 };
 
 #endif
 };
 
+void
+ao_debug_out(char c);
+
 #if HAS_SERIAL_1
 extern struct ao_stm_usart     ao_stm_usart1;
 #endif
 #if HAS_SERIAL_1
 extern struct ao_stm_usart     ao_stm_usart1;
 #endif
@@ -607,4 +610,6 @@ ao_arch_wait_interrupt(void) {
                ao_arch_irqrestore(__mask);             \
        } while (0)
 
                ao_arch_irqrestore(__mask);             \
        } while (0)
 
+void start(void);
+
 #endif /* _AO_ARCH_FUNCS_H_ */
 #endif /* _AO_ARCH_FUNCS_H_ */
index 2746d7f8e60b558e48056f2b3653daf237a6be2b..2bcd684909af1fccfe843fd9655dee4e586d53e0 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "ao.h"
  */
 
 #include "ao.h"
+#include "ao_beep.h"
 
 #if BEEPER_TIMER == 2
 #define stm_beeper     stm_tim2
 
 #if BEEPER_TIMER == 2
 #define stm_beeper     stm_tim2
index 0109ec815525b2acdf3c6abe36cf5c86822794e6..6c459cf4df9a315d9765b0c6e27f8cfdaae531d7 100644 (file)
@@ -2045,4 +2045,62 @@ struct stm_exti {
 
 extern struct stm_exti stm_exti;
 
 
 extern struct stm_exti stm_exti;
 
+#define isr_decl(name) \
+       void __attribute__ ((weak)) stm_ ## name ## _isr(void);
+
+isr_decl(nmi)
+isr_decl(hardfault)
+isr_decl(memmanage)
+isr_decl(busfault)
+isr_decl(usagefault)
+isr_decl(svc)
+isr_decl(debugmon)
+isr_decl(pendsv)
+isr_decl(systick)
+isr_decl(wwdg)
+isr_decl(pvd)
+isr_decl(tamper_stamp)
+isr_decl(rtc_wkup)
+isr_decl(flash)
+isr_decl(rcc)
+isr_decl(exti0)
+isr_decl(exti1)
+isr_decl(exti2)
+isr_decl(exti3)
+isr_decl(exti4)
+isr_decl(dma1_channel1)
+isr_decl(dma1_channel2)
+isr_decl(dma1_channel3)
+isr_decl(dma1_channel4)
+isr_decl(dma1_channel5)
+isr_decl(dma1_channel6)
+isr_decl(dma1_channel7)
+isr_decl(adc1)
+isr_decl(usb_hp)
+isr_decl(usb_lp)
+isr_decl(dac)
+isr_decl(comp)
+isr_decl(exti9_5)
+isr_decl(lcd)
+isr_decl(tim9)
+isr_decl(tim10)
+isr_decl(tim11)
+isr_decl(tim2)
+isr_decl(tim3)
+isr_decl(tim4)
+isr_decl(i2c1_ev)
+isr_decl(i2c1_er)
+isr_decl(i2c2_ev)
+isr_decl(i2c2_er)
+isr_decl(spi1)
+isr_decl(spi2)
+isr_decl(usart1)
+isr_decl(usart2)
+isr_decl(usart3)
+isr_decl(exti15_10)
+isr_decl(rtc_alarm)
+isr_decl(usb_fs_wkup)
+isr_decl(tim6)
+isr_decl(tim7)
+
 #endif /* _STM32L_H_ */
 #endif /* _STM32L_H_ */
index 70f273d3ba46ce081ca8326113c16582668ca627..f455ed06a14f4e64c20ade4d959590fcd2047da4 100644 (file)
@@ -503,4 +503,9 @@ uint8_t
 ao_usb_write2(uint16_t len);
 #endif /* AO_USB_DIRECTIO */
 
 ao_usb_write2(uint16_t len);
 #endif /* AO_USB_DIRECTIO */
 
+void start(void);
+
+void
+ao_debug_out(char c);
+
 #endif /* _AO_ARCH_FUNCS_H_ */
 #endif /* _AO_ARCH_FUNCS_H_ */
index 968c1295cda4072e2c7cc0766dd8efeecadf07ca..a2a58cec07e6add33ed4ce64a6a689be203480b8 100644 (file)
@@ -2144,4 +2144,49 @@ struct stm_usart {
 extern struct stm_usart        stm_usart1;
 extern struct stm_usart stm_usart2;
 
 extern struct stm_usart        stm_usart1;
 extern struct stm_usart stm_usart2;
 
+#define isr_decl(name) \
+       void __attribute__ ((weak)) stm_ ## name ## _isr(void);
+
+isr_decl(nmi)
+isr_decl(hardfault)
+isr_decl(memmanage)
+isr_decl(busfault)
+isr_decl(usagefault)
+isr_decl(svc)
+isr_decl(debugmon)
+isr_decl(pendsv)
+isr_decl(systick)
+isr_decl(wwdg)
+isr_decl(pvd)
+isr_decl(rtc)
+isr_decl(flash)
+isr_decl(rcc_crs)
+isr_decl(exti0_1)
+isr_decl(exti2_3)
+isr_decl(exti4_15)
+isr_decl(tsc)
+isr_decl(dma_ch1)
+isr_decl(dma_ch2_3)
+isr_decl(dma_ch4_5_6)
+isr_decl(adc_comp)
+isr_decl(tim1_brk_up_trg_com)
+isr_decl(tim1_cc)
+isr_decl(tim2)
+isr_decl(tim3)
+isr_decl(tim6_dac)
+isr_decl(tim7)
+isr_decl(tim14)
+isr_decl(tim15)
+isr_decl(tim16)
+isr_decl(tim17)
+isr_decl(i2c1)
+isr_decl(i2c2)
+isr_decl(spi1)
+isr_decl(spi2)
+isr_decl(usart1)
+isr_decl(usart2)
+isr_decl(usart3_4_5_6_7_8)
+isr_decl(cec_can)
+isr_decl(usb)
+
 #endif /* _STM32F0_H_ */
 #endif /* _STM32F0_H_ */