├── .gitignore ├── Makefile ├── VERSION ├── bertos ├── algo │ ├── crc.c │ ├── crc.h │ ├── crc_ccitt.c │ ├── crc_ccitt.h │ ├── crc_test.c │ ├── md2.c │ ├── md2.h │ ├── mean.h │ ├── pid_control.c │ ├── pid_control.h │ ├── ramp.c │ ├── ramp.h │ ├── ramp_test.c │ ├── rand.c │ ├── rand.h │ ├── randpool.c │ ├── randpool.h │ ├── reverse_test.c │ ├── rle.c │ ├── rle.h │ ├── rotating_hash.h │ ├── tea.c │ └── tea.h ├── benchmark │ ├── context_switch.c │ ├── context_switch.h │ ├── kernel_footprint.c │ └── kernel_footprint.h ├── cfg │ ├── cfg_adc.h │ ├── cfg_afsk.h │ ├── cfg_arch.h │ ├── cfg_attr.h │ ├── cfg_ax25.h │ ├── cfg_battfs.h │ ├── cfg_boot.h │ ├── cfg_buzzerled.h │ ├── cfg_context_switch.h │ ├── cfg_dac.h │ ├── cfg_dataflash.h │ ├── cfg_dc_motor.h │ ├── cfg_debug.h │ ├── cfg_eeprom.h │ ├── cfg_emb_flash.h │ ├── cfg_eth.h │ ├── cfg_fat.h │ ├── cfg_flash25.h │ ├── cfg_formatwr.h │ ├── cfg_gfx.h │ ├── cfg_hashtable.h │ ├── cfg_heap.h │ ├── cfg_i2c.h │ ├── cfg_i2s.h │ ├── cfg_ini_reader.h │ ├── cfg_kbd.h │ ├── cfg_kern.h │ ├── cfg_keytag.h │ ├── cfg_kfile.h │ ├── cfg_kiss.h │ ├── cfg_lcd_32122a.h │ ├── cfg_lcd_hd44.h │ ├── cfg_led_7seg.h │ ├── cfg_lm75.h │ ├── cfg_lwip.h │ ├── cfg_md2.h │ ├── cfg_menu.h │ ├── cfg_monitor.h │ ├── cfg_nand.h │ ├── cfg_nmea.h │ ├── cfg_ntc.h │ ├── cfg_parser.h │ ├── cfg_phase.h │ ├── cfg_pid.h │ ├── cfg_pocketbus.h │ ├── cfg_proc.h │ ├── cfg_pwm.h │ ├── cfg_ramp.h │ ├── cfg_random.h │ ├── cfg_randpool.h │ ├── cfg_sd.h │ ├── cfg_sem.h │ ├── cfg_ser.h │ ├── cfg_signal.h │ ├── cfg_spi_bitbang.h │ ├── cfg_spi_dma.h │ ├── cfg_stepper.h │ ├── cfg_tas5706a.h │ ├── cfg_tftp.h │ ├── cfg_thermo.h │ ├── cfg_timer.h │ ├── cfg_usb.h │ ├── cfg_usbkbd.h │ ├── cfg_usbmouse.h │ ├── cfg_usbser.h │ ├── cfg_wdt.h │ ├── cfg_xmodem.h │ ├── compiler.h │ ├── debug.h │ ├── depend.h │ ├── kfile_debug.c │ ├── kfile_debug.h │ ├── log.h │ ├── macros.h │ ├── module.h │ ├── os.h │ └── test.h ├── config.mk ├── cpu │ ├── arm │ │ ├── drv │ │ │ ├── adc_arm.c │ │ │ ├── adc_arm.h │ │ │ ├── adc_at91.c │ │ │ ├── adc_at91.h │ │ │ ├── eth_at91.c │ │ │ ├── eth_at91.h │ │ │ ├── flash_arm.h │ │ │ ├── flash_at91.c │ │ │ ├── flash_at91.h │ │ │ ├── flash_lpc2.c │ │ │ ├── flash_lpc2.h │ │ │ ├── i2c_arm.h │ │ │ ├── i2c_at91.h │ │ │ ├── i2c_lpc2.c │ │ │ ├── i2c_lpc2.h │ │ │ ├── i2s_at91.c │ │ │ ├── i2s_at91.h │ │ │ ├── kdebug_arm.c │ │ │ ├── kdebug_at91.c │ │ │ ├── kdebug_at91.h │ │ │ ├── kdebug_lpc2.c │ │ │ ├── pwm_arm.c │ │ │ ├── pwm_arm.h │ │ │ ├── pwm_at91.c │ │ │ ├── pwm_at91.h │ │ │ ├── ser_arm.c │ │ │ ├── ser_arm.h │ │ │ ├── ser_at91.c │ │ │ ├── ser_at91.h │ │ │ ├── ser_lpc2.c │ │ │ ├── ser_lpc2.h │ │ │ ├── spi_dma_at91.c │ │ │ ├── spi_dma_at91.h │ │ │ ├── stepper_arm.c │ │ │ ├── stepper_arm.h │ │ │ ├── stepper_at91.c │ │ │ ├── stepper_at91.h │ │ │ ├── stepper_at91_hwtest.c │ │ │ ├── sysirq_at91.c │ │ │ ├── sysirq_at91.h │ │ │ ├── timer_arm.c │ │ │ ├── timer_arm.h │ │ │ ├── timer_at91.c │ │ │ ├── timer_at91.h │ │ │ ├── timer_lpc2.c │ │ │ ├── timer_lpc2.h │ │ │ ├── twi_arm.c │ │ │ ├── twi_arm.h │ │ │ ├── twi_at91.c │ │ │ ├── twi_at91.h │ │ │ ├── vic_lpc2.c │ │ │ ├── vic_lpc2.h │ │ │ └── wdt_arm.h │ │ ├── hw │ │ │ ├── crt_arm7tdmi.S │ │ │ ├── crtat91sam7_rom.S │ │ │ ├── init_at91.c │ │ │ ├── init_lpc2.c │ │ │ ├── pll_at91.h │ │ │ ├── switch_arm.S │ │ │ ├── switch_ctx_arm.S │ │ │ ├── vectors_at91.S │ │ │ └── vectors_lpc2.S │ │ ├── info │ │ │ ├── AT91SAM7S128.cdef │ │ │ ├── AT91SAM7S256.cdef │ │ │ ├── AT91SAM7S512.cdef │ │ │ ├── AT91SAM7S64.cdef │ │ │ ├── AT91SAM7X128.cdef │ │ │ ├── AT91SAM7X256.cdef │ │ │ ├── AT91SAM7X512.cdef │ │ │ ├── LPC2378.cdef │ │ │ ├── at91sam7.common │ │ │ ├── at91sam7s.common │ │ │ ├── at91sam7x.common │ │ │ └── lpc2.common │ │ ├── io │ │ │ ├── arm.h │ │ │ ├── at91.h │ │ │ ├── at91_adc.h │ │ │ ├── at91_aic.h │ │ │ ├── at91_dbgu.h │ │ │ ├── at91_emac.h │ │ │ ├── at91_mc.h │ │ │ ├── at91_pio.h │ │ │ ├── at91_pit.h │ │ │ ├── at91_pmc.h │ │ │ ├── at91_pwm.h │ │ │ ├── at91_rstc.h │ │ │ ├── at91_spi.h │ │ │ ├── at91_ssc.h │ │ │ ├── at91_tc.h │ │ │ ├── at91_twi.h │ │ │ ├── at91_us.h │ │ │ ├── at91_wdt.h │ │ │ ├── at91sam7.h │ │ │ └── lpc23xx.h │ │ └── scripts │ │ │ ├── arm7tdmi_ram.ld │ │ │ ├── arm7tdmi_rom.ld │ │ │ ├── at91sam7_128_ram.ld │ │ │ ├── at91sam7_128_rom.ld │ │ │ ├── at91sam7_256_ram.ld │ │ │ ├── at91sam7_256_rom.ld │ │ │ ├── at91sam7_512_ram.ld │ │ │ ├── at91sam7_512_rom.ld │ │ │ ├── at91sam7_64_ram.ld │ │ │ ├── at91sam7_64_rom.ld │ │ │ └── lpc2378.ld │ ├── attr.h │ ├── avr │ │ ├── drv │ │ │ ├── adc_avr.c │ │ │ ├── adc_avr.h │ │ │ ├── flash_avr.c │ │ │ ├── flash_avr.h │ │ │ ├── i2c_avr.c │ │ │ ├── i2c_avr.h │ │ │ ├── kdebug_avr.c │ │ │ ├── kdebug_mega.c │ │ │ ├── kdebug_xmega.c │ │ │ ├── pwm_avr.c │ │ │ ├── pwm_avr.h │ │ │ ├── ser_avr.c │ │ │ ├── ser_avr.h │ │ │ ├── ser_mega.c │ │ │ ├── ser_mega.h │ │ │ ├── ser_simple_avr.c │ │ │ ├── ser_simple_avr.h │ │ │ ├── ser_xmega.c │ │ │ ├── ser_xmega.h │ │ │ ├── stepper_avr.c │ │ │ ├── stepper_avr.h │ │ │ ├── timer_avr.c │ │ │ ├── timer_avr.h │ │ │ ├── timer_mega.c │ │ │ ├── timer_mega.h │ │ │ ├── timer_simple_avr.c │ │ │ ├── timer_simple_avr.h │ │ │ ├── timer_xmega.c │ │ │ ├── timer_xmega.h │ │ │ └── wdt_avr.h │ │ ├── hw │ │ │ ├── init_xmega.c │ │ │ ├── switch_avr.S │ │ │ └── switch_ctx_avr.S │ │ └── info │ │ │ ├── ATmega103.cdef │ │ │ ├── ATmega128.cdef │ │ │ ├── ATmega1280.cdef │ │ │ ├── ATmega1281.cdef │ │ │ ├── ATmega168.cdef │ │ │ ├── ATmega2560.cdef │ │ │ ├── ATmega32.cdef │ │ │ ├── ATmega328P.cdef │ │ │ ├── ATmega64.cdef │ │ │ ├── ATmega8.cdef │ │ │ ├── ATxmega32D4.cdef │ │ │ ├── avr.common │ │ │ ├── avr_post.common │ │ │ └── mega.common │ ├── byteorder.h │ ├── byteorder_test.c │ ├── cortex-m3 │ │ ├── drv │ │ │ ├── adc_cm3.h │ │ │ ├── adc_lm3s.c │ │ │ ├── adc_lm3s.h │ │ │ ├── adc_sam3.c │ │ │ ├── adc_sam3.h │ │ │ ├── adc_stm32.c │ │ │ ├── adc_stm32.h │ │ │ ├── clock_cm3.h │ │ │ ├── clock_lm3s.c │ │ │ ├── clock_lm3s.h │ │ │ ├── clock_sam3.c │ │ │ ├── clock_sam3.h │ │ │ ├── clock_stm32.c │ │ │ ├── clock_stm32.h │ │ │ ├── dac_cm3.h │ │ │ ├── dac_sam3.c │ │ │ ├── dac_sam3.h │ │ │ ├── eth_sam3.c │ │ │ ├── eth_sam3.h │ │ │ ├── flash_cm3.h │ │ │ ├── flash_lm3s.c │ │ │ ├── flash_lm3s.h │ │ │ ├── flash_stm32.c │ │ │ ├── flash_stm32.h │ │ │ ├── gpio_lm3s.c │ │ │ ├── gpio_lm3s.h │ │ │ ├── gpio_stm32.c │ │ │ ├── gpio_stm32.h │ │ │ ├── i2c_cm3.h │ │ │ ├── i2c_lm3s.c │ │ │ ├── i2c_lm3s.h │ │ │ ├── i2c_sam3.c │ │ │ ├── i2c_sam3.h │ │ │ ├── i2c_stm32.c │ │ │ ├── i2c_stm32.h │ │ │ ├── irq_cm3.c │ │ │ ├── irq_cm3.h │ │ │ ├── kdebug_cm3.c │ │ │ ├── kdebug_lm3s.c │ │ │ ├── kdebug_lm3s.h │ │ │ ├── kdebug_sam3.c │ │ │ ├── kdebug_stm32.c │ │ │ ├── kdebug_stm32.h │ │ │ ├── nand_sam3.c │ │ │ ├── random_lm3s.c │ │ │ ├── random_stm32.c │ │ │ ├── rtc_stm32.c │ │ │ ├── ser_cm3.h │ │ │ ├── ser_lm3s.c │ │ │ ├── ser_lm3s.h │ │ │ ├── ser_sam3.c │ │ │ ├── ser_sam3.h │ │ │ ├── ser_stm32.c │ │ │ ├── ser_stm32.h │ │ │ ├── spi_dma_sam3.c │ │ │ ├── ssi_lm3s.c │ │ │ ├── ssi_lm3s.h │ │ │ ├── timer_cm3.c │ │ │ ├── timer_cm3.h │ │ │ ├── usb_stm32.c │ │ │ └── usb_stm32.h │ │ ├── hw │ │ │ ├── crt_cm3.S │ │ │ ├── crt_cm3_iar.S │ │ │ ├── iar_cm3.S │ │ │ ├── init_cm3.c │ │ │ ├── switch_ctx_cm3.c │ │ │ ├── switch_ctx_cm3.h │ │ │ ├── vectors_cm3.S │ │ │ └── vectors_cm3_iar.S │ │ ├── info │ │ │ ├── LM3S1968.cdef │ │ │ ├── LM3S8962.cdef │ │ │ ├── SAM3N4.cdef │ │ │ ├── SAM3X8.cdef │ │ │ ├── STM32F100RB.cdef │ │ │ ├── STM32F101C4.cdef │ │ │ ├── STM32F103RB.cdef │ │ │ ├── STM32F103RE.cdef │ │ │ └── cm3.common │ │ ├── io │ │ │ ├── cm3.h │ │ │ ├── lm3s.h │ │ │ ├── lm3s_adc.h │ │ │ ├── lm3s_com.h │ │ │ ├── lm3s_gpio.h │ │ │ ├── lm3s_i2c.h │ │ │ ├── lm3s_ints.h │ │ │ ├── lm3s_memmap.h │ │ │ ├── lm3s_nvic.h │ │ │ ├── lm3s_pwm.h │ │ │ ├── lm3s_ssi.h │ │ │ ├── lm3s_sysctl.h │ │ │ ├── lm3s_types.h │ │ │ ├── lm3s_uart.h │ │ │ ├── sam3.h │ │ │ ├── sam3_adc.h │ │ │ ├── sam3_dacc.h │ │ │ ├── sam3_emac.h │ │ │ ├── sam3_flash.h │ │ │ ├── sam3_ints.h │ │ │ ├── sam3_nvic.h │ │ │ ├── sam3_pdc.h │ │ │ ├── sam3_pio.h │ │ │ ├── sam3_pmc.h │ │ │ ├── sam3_rstc.h │ │ │ ├── sam3_sdramc.h │ │ │ ├── sam3_smc.h │ │ │ ├── sam3_spi.h │ │ │ ├── sam3_ssc.h │ │ │ ├── sam3_sysctl.h │ │ │ ├── sam3_tc.h │ │ │ ├── sam3_twi.h │ │ │ ├── sam3_uart.h │ │ │ ├── sam3_usart.h │ │ │ ├── sam3_wdt.h │ │ │ ├── sam3n.h │ │ │ ├── stm32.h │ │ │ ├── stm32_adc.h │ │ │ ├── stm32_flash.h │ │ │ ├── stm32_gpio.h │ │ │ ├── stm32_i2c.h │ │ │ ├── stm32_ints.h │ │ │ ├── stm32_memmap.h │ │ │ ├── stm32_nvic.h │ │ │ ├── stm32_pwr.h │ │ │ └── stm32_uart.h │ │ └── scripts │ │ │ ├── cortex-m3_ram.ld │ │ │ ├── cortex-m3_rom.ld │ │ │ ├── lm3s1968_ram.ld │ │ │ ├── lm3s1968_rom.ld │ │ │ ├── lm3s8962_ram.ld │ │ │ ├── lm3s8962_rom.ld │ │ │ ├── sam3n4_ram.ld │ │ │ ├── sam3n4_rom.ld │ │ │ ├── sam3x8_ram.icf │ │ │ ├── sam3x8_rom.icf │ │ │ ├── sam3x8_rom.ld │ │ │ ├── stm32f100rb_rom.ld │ │ │ ├── stm32f101c4_ram.ld │ │ │ ├── stm32f101c4_rom.ld │ │ │ ├── stm32f103rb_rom.ld │ │ │ ├── stm32f103re_rom.ld │ │ │ └── stm32f103t8_rom.ld │ ├── detect.h │ ├── dsp56k │ │ ├── drv │ │ │ ├── buzzerled_dsp56k.h │ │ │ ├── kdebug_dsp56k.c │ │ │ ├── ser_dsp56k.c │ │ │ ├── ser_dsp56k.h │ │ │ └── timer_dsp56k.h │ │ └── hw │ │ │ └── switch_dsp56k.c │ ├── frame.h │ ├── i196 │ │ ├── drv │ │ │ ├── kdebug_i196.c │ │ │ ├── ser_i196.c │ │ │ └── timer_i196.h │ │ └── hw │ │ │ └── switch_i196.s32 │ ├── irq.h │ ├── msp430 │ │ ├── drv │ │ │ ├── kdebug_msp430.c │ │ │ └── kdebug_msp430.h │ │ └── info │ │ │ ├── MSP430F2274.cdef │ │ │ ├── MSP430G2231.cdef │ │ │ ├── msp430.common │ │ │ └── msp430_post.common │ ├── newcore │ ├── path.common │ ├── pgm.h │ ├── power.h │ └── types.h ├── drv │ ├── adc.c │ ├── adc.h │ ├── buzzer.c │ ├── buzzer.h │ ├── buzzerled.c │ ├── buzzerled.h │ ├── dac.h │ ├── dataflash.c │ ├── dataflash.h │ ├── dataflash_hwtest.c │ ├── dc_motor.c │ ├── dc_motor.h │ ├── dc_motor_hwtest.c │ ├── eeprom.c │ ├── eeprom.h │ ├── eth.h │ ├── flash.h │ ├── flash25.c │ ├── flash25.h │ ├── flash25_hwtest.c │ ├── ft245rl.c │ ├── ft245rl.h │ ├── i2c.c │ ├── i2c.h │ ├── i2c_bitbang.c │ ├── kbd.c │ ├── kbd.h │ ├── kdebug.c │ ├── lcd_32122a.c │ ├── lcd_32122a.h │ ├── lcd_gfx_hwtest.c │ ├── lcd_gfx_qt.cpp │ ├── lcd_gfx_qt.h │ ├── lcd_hd44.c │ ├── lcd_hd44.h │ ├── lcd_hd44_hwtest.c │ ├── lcd_hx8347.c │ ├── lcd_hx8347.h │ ├── lcd_ili9225.c │ ├── lcd_ili9225.h │ ├── lcd_lm44_qt.cpp │ ├── lcd_lm44_qt.h │ ├── lcd_rit128x96.c │ ├── lcd_rit128x96.h │ ├── lcd_text.c │ ├── lcd_text.h │ ├── lcd_text_hwtest.c │ ├── led_7seg.c │ ├── led_7seg.h │ ├── lm75.c │ ├── lm75.h │ ├── mcp41.c │ ├── mcp41.h │ ├── mpxx6115a.h │ ├── nand.c │ ├── nand.h │ ├── ntc.c │ ├── ntc.h │ ├── pcf8574.c │ ├── pcf8574.h │ ├── phase.c │ ├── phase.h │ ├── pwm.c │ ├── pwm.h │ ├── pwm_hwtest.c │ ├── rtc.h │ ├── sd.c │ ├── sd.h │ ├── ser.c │ ├── ser.h │ ├── ser_p.h │ ├── sipo.c │ ├── sipo.h │ ├── spi_bitbang.c │ ├── spi_bitbang.h │ ├── spi_dma.h │ ├── stepper.c │ ├── stepper.h │ ├── tas5706a.c │ ├── tas5706a.h │ ├── tc520.c │ ├── tc520.h │ ├── thermo.c │ ├── thermo.h │ ├── timer.c │ ├── timer.h │ ├── timer_test.c │ ├── tlv5618.c │ ├── tlv5618.h │ ├── tmp123.c │ ├── tmp123.h │ ├── usb.h │ ├── usb_endpoint.h │ ├── usb_hid.h │ ├── usbkbd.c │ ├── usbkbd.h │ ├── usbmouse.c │ ├── usbmouse.h │ ├── usbser.c │ ├── usbser.h │ └── wdt.h ├── dt │ ├── dnotifier.c │ ├── dnotifier.h │ ├── dtag.h │ ├── dwidget.c │ ├── dwidget.h │ ├── editbool.c │ ├── editbool.h │ ├── editint.c │ └── editint.h ├── emul │ ├── diskio_emul.c │ ├── emul.cpp │ ├── emul.h │ ├── emul.mk │ ├── emulkbd.cpp │ ├── emulkbd.h │ ├── emulwin.cpp │ ├── emulwin.h │ ├── kfile_posix.c │ ├── kfile_posix.h │ ├── ser_posix.c │ ├── switch.S │ ├── switch_ctx_emul.S │ ├── switch_i386.S │ ├── switch_ppc.S │ ├── switch_win32.s │ ├── switch_x86_64.s │ ├── timer_posix.c │ ├── timer_posix.h │ ├── timer_qt.c │ └── timer_qt.h ├── fonts │ ├── convbdf │ ├── fixed6x8.c │ ├── fonts.mk │ ├── gohu.bdf │ ├── gohu.c │ ├── helvB10.bdf │ ├── helvB10.c │ ├── luBS14.bdf │ ├── luBS14.c │ ├── ncenB18.bdf │ └── ncenB18.c ├── fs │ ├── battfs.c │ ├── battfs.h │ ├── battfs_test.c │ ├── fat.c │ ├── fat.h │ ├── fat_test.c │ └── fatfs │ │ ├── 00readme.txt │ │ ├── diskio.c │ │ ├── diskio.h │ │ ├── ff.c │ │ ├── ff.h │ │ ├── integer.h │ │ └── option │ │ ├── cc932.c │ │ ├── cc936.c │ │ ├── cc949.c │ │ ├── cc950.c │ │ ├── ccsbcs.c │ │ └── syncobj.c ├── gfx │ ├── bitmap.c │ ├── charts.c │ ├── charts.h │ ├── fillpoly.cpp │ ├── font.h │ ├── font_10x20.c │ ├── gfx.h │ ├── gfx_p.h │ ├── line.c │ ├── text.c │ ├── text.h │ ├── text_format.c │ ├── win.c │ └── win.h ├── gui │ ├── levelbar.c │ ├── levelbar.h │ ├── leveledit.c │ ├── leveledit.h │ ├── menu.c │ ├── menu.h │ ├── menubar.c │ └── menubar.h ├── hw │ ├── hw_afsk.h │ ├── hw_blanker.h │ ├── hw_boot.h │ ├── hw_buzzer.h │ ├── hw_buzzerled.h │ ├── hw_cpufreq.h │ ├── hw_dataflash.c │ ├── hw_dataflash.h │ ├── hw_dc_motor.h │ ├── hw_eth.c │ ├── hw_eth.h │ ├── hw_ft245rl.h │ ├── hw_hx8347.h │ ├── hw_i2c_bitbang.h │ ├── hw_ili9225.h │ ├── hw_input.h │ ├── hw_kbd.h │ ├── hw_lcd.h │ ├── hw_lcd_32122a.h │ ├── hw_lcd_hd44.h │ ├── hw_led.h │ ├── hw_led_7seg.h │ ├── hw_lm75.h │ ├── hw_mcp41.c │ ├── hw_mcp41.h │ ├── hw_ntc.c │ ├── hw_ntc.h │ ├── hw_phase.c │ ├── hw_phase.h │ ├── hw_rit128x96.h │ ├── hw_sd.h │ ├── hw_sensor.h │ ├── hw_ser.h │ ├── hw_sipo.h │ ├── hw_spi.h │ ├── hw_spi_dma.h │ ├── hw_stepper.h │ ├── hw_tas5706a.h │ ├── hw_tc520.h │ ├── hw_thermo.h │ ├── hw_timer.h │ ├── hw_tlv5618.h │ ├── hw_tmp123.h │ ├── kbd_map.h │ ├── mcp41_map.h │ ├── ntc_map.h │ ├── phase_map.h │ ├── pwm_map.h │ └── thermo_map.h ├── icons │ ├── Makefile │ ├── flipimage.cpp │ ├── logo.c │ ├── logo.h │ └── logo.png ├── io │ ├── kblock.c │ ├── kblock.h │ ├── kblock_posix.c │ ├── kblock_posix.h │ ├── kblock_ram.c │ ├── kblock_ram.h │ ├── kfile.c │ ├── kfile.h │ ├── kfile_block.c │ ├── kfile_block.h │ ├── kfile_test.c │ ├── reblock.c │ └── reblock.h ├── kern │ ├── coop.c │ ├── irq.c │ ├── irq.h │ ├── kfile.h │ ├── monitor.c │ ├── monitor.h │ ├── msg.h │ ├── msg_test.c │ ├── preempt.c │ ├── proc.c │ ├── proc.h │ ├── proc_p.h │ ├── proc_test.c │ ├── proc_test │ │ ├── coop_heap_test.c │ │ ├── coop_msg_test.c │ │ ├── coop_pri_heap_test.c │ │ ├── coop_pri_test.c │ │ ├── coop_sem_test.c │ │ ├── coop_signal_test.c │ │ ├── coop_test.c │ │ ├── preempt_heap_test.c │ │ ├── preempt_msg_test.c │ │ ├── preempt_pri_heap_test.c │ │ ├── preempt_pri_test.c │ │ ├── preempt_sem_test.c │ │ ├── preempt_signal_test.c │ │ └── preempt_test.c │ ├── sem.c │ ├── sem.h │ ├── sem_test.c │ ├── signal.c │ ├── signal.h │ └── signal_test.c ├── mware │ ├── blanker.c │ ├── blanker.h │ ├── byteorder.h │ ├── cmd_hunk.h │ ├── event.c │ ├── event.h │ ├── except.h │ ├── formatwr.c │ ├── formatwr.h │ ├── hex.c │ ├── hex.h │ ├── ini_reader.c │ ├── ini_reader.h │ ├── ini_reader_test.c │ ├── messages.c │ ├── messages.h │ ├── observer.c │ ├── observer.h │ ├── parser.c │ ├── parser.h │ ├── pgm.h │ ├── readline.c │ ├── readline.h │ ├── resource.c │ ├── resource.h │ ├── rle.h │ ├── sprintf.c │ ├── sprintf_test.c │ ├── strtol10.c │ └── strtol10.h ├── net │ ├── afsk.c │ ├── afsk.h │ ├── afsk_test.c │ ├── ax25.c │ ├── ax25.h │ ├── ax25_test.c │ ├── keytag.c │ ├── keytag.h │ ├── kiss.c │ ├── kiss.h │ ├── lwip.c │ ├── lwip.h │ ├── lwip │ │ ├── CHANGELOG │ │ ├── COPYING │ │ ├── FILES │ │ ├── README │ │ ├── doc │ │ │ ├── FILES │ │ │ ├── contrib.txt │ │ │ ├── rawapi.txt │ │ │ ├── savannah.txt │ │ │ ├── snmp_agent.txt │ │ │ └── sys_arch.txt │ │ ├── src │ │ │ ├── FILES │ │ │ ├── api │ │ │ │ ├── api_lib.c │ │ │ │ ├── api_msg.c │ │ │ │ ├── err.c │ │ │ │ ├── netbuf.c │ │ │ │ ├── netdb.c │ │ │ │ ├── netifapi.c │ │ │ │ ├── sockets.c │ │ │ │ └── tcpip.c │ │ │ ├── arch │ │ │ │ └── sys_arch.c │ │ │ ├── core │ │ │ │ ├── dhcp.c │ │ │ │ ├── dns.c │ │ │ │ ├── init.c │ │ │ │ ├── ipv4 │ │ │ │ │ ├── autoip.c │ │ │ │ │ ├── icmp.c │ │ │ │ │ ├── igmp.c │ │ │ │ │ ├── inet.c │ │ │ │ │ ├── inet_chksum.c │ │ │ │ │ ├── ip.c │ │ │ │ │ ├── ip_addr.c │ │ │ │ │ └── ip_frag.c │ │ │ │ ├── ipv6 │ │ │ │ │ ├── README │ │ │ │ │ ├── icmp6.c │ │ │ │ │ ├── inet6.c │ │ │ │ │ ├── ip6.c │ │ │ │ │ └── ip6_addr.c │ │ │ │ ├── mem.c │ │ │ │ ├── memp.c │ │ │ │ ├── netif.c │ │ │ │ ├── pbuf.c │ │ │ │ ├── raw.c │ │ │ │ ├── snmp │ │ │ │ │ ├── asn1_dec.c │ │ │ │ │ ├── asn1_enc.c │ │ │ │ │ ├── mib2.c │ │ │ │ │ ├── mib_structs.c │ │ │ │ │ ├── msg_in.c │ │ │ │ │ └── msg_out.c │ │ │ │ ├── stats.c │ │ │ │ ├── sys.c │ │ │ │ ├── tcp.c │ │ │ │ ├── tcp_in.c │ │ │ │ ├── tcp_out.c │ │ │ │ └── udp.c │ │ │ ├── include │ │ │ │ ├── arch │ │ │ │ │ ├── cc.h │ │ │ │ │ ├── perf.h │ │ │ │ │ └── sys_arch.h │ │ │ │ ├── ipv4 │ │ │ │ │ └── lwip │ │ │ │ │ │ ├── autoip.h │ │ │ │ │ │ ├── icmp.h │ │ │ │ │ │ ├── igmp.h │ │ │ │ │ │ ├── inet.h │ │ │ │ │ │ ├── inet_chksum.h │ │ │ │ │ │ ├── ip.h │ │ │ │ │ │ ├── ip_addr.h │ │ │ │ │ │ └── ip_frag.h │ │ │ │ ├── ipv6 │ │ │ │ │ └── lwip │ │ │ │ │ │ ├── icmp.h │ │ │ │ │ │ ├── inet.h │ │ │ │ │ │ ├── ip.h │ │ │ │ │ │ └── ip_addr.h │ │ │ │ ├── lwip │ │ │ │ │ ├── api.h │ │ │ │ │ ├── api_msg.h │ │ │ │ │ ├── arch.h │ │ │ │ │ ├── debug.h │ │ │ │ │ ├── def.h │ │ │ │ │ ├── dhcp.h │ │ │ │ │ ├── dns.h │ │ │ │ │ ├── err.h │ │ │ │ │ ├── init.h │ │ │ │ │ ├── mem.h │ │ │ │ │ ├── memp.h │ │ │ │ │ ├── memp_std.h │ │ │ │ │ ├── netbuf.h │ │ │ │ │ ├── netdb.h │ │ │ │ │ ├── netif.h │ │ │ │ │ ├── netifapi.h │ │ │ │ │ ├── opt.h │ │ │ │ │ ├── pbuf.h │ │ │ │ │ ├── raw.h │ │ │ │ │ ├── sio.h │ │ │ │ │ ├── snmp.h │ │ │ │ │ ├── snmp_asn1.h │ │ │ │ │ ├── snmp_msg.h │ │ │ │ │ ├── snmp_structs.h │ │ │ │ │ ├── sockets.h │ │ │ │ │ ├── stats.h │ │ │ │ │ ├── sys.h │ │ │ │ │ ├── tcp.h │ │ │ │ │ ├── tcpip.h │ │ │ │ │ └── udp.h │ │ │ │ ├── lwipopts.h │ │ │ │ └── netif │ │ │ │ │ ├── etharp.h │ │ │ │ │ ├── ethernetif.h │ │ │ │ │ ├── loopif.h │ │ │ │ │ ├── ppp_oe.h │ │ │ │ │ └── slipif.h │ │ │ └── netif │ │ │ │ ├── FILES │ │ │ │ ├── etharp.c │ │ │ │ ├── ethernetif.c │ │ │ │ ├── loopif.c │ │ │ │ ├── ppp │ │ │ │ ├── auth.c │ │ │ │ ├── auth.h │ │ │ │ ├── chap.c │ │ │ │ ├── chap.h │ │ │ │ ├── chpms.c │ │ │ │ ├── chpms.h │ │ │ │ ├── fsm.c │ │ │ │ ├── fsm.h │ │ │ │ ├── ipcp.c │ │ │ │ ├── ipcp.h │ │ │ │ ├── lcp.c │ │ │ │ ├── lcp.h │ │ │ │ ├── magic.c │ │ │ │ ├── magic.h │ │ │ │ ├── md5.c │ │ │ │ ├── md5.h │ │ │ │ ├── pap.c │ │ │ │ ├── pap.h │ │ │ │ ├── ppp.c │ │ │ │ ├── ppp.h │ │ │ │ ├── ppp_oe.c │ │ │ │ ├── pppdebug.h │ │ │ │ ├── randm.c │ │ │ │ ├── randm.h │ │ │ │ ├── vj.c │ │ │ │ ├── vj.h │ │ │ │ └── vjbsdhdr.h │ │ │ │ └── slipif.c │ │ └── test │ │ │ └── unit │ │ │ ├── lwip_check.h │ │ │ ├── lwip_unittests.c │ │ │ ├── tcp │ │ │ ├── tcp_helper.c │ │ │ ├── tcp_helper.h │ │ │ ├── test_tcp.c │ │ │ ├── test_tcp.h │ │ │ ├── test_tcp_oos.c │ │ │ └── test_tcp_oos.h │ │ │ └── udp │ │ │ ├── test_udp.c │ │ │ └── test_udp.h │ ├── nmea.c │ ├── nmea.h │ ├── nmea_test.c │ ├── nmeap │ │ ├── COPYING │ │ ├── Doxyfile │ │ ├── Makefile │ │ ├── README │ │ ├── doc │ │ │ └── tutorial.html │ │ ├── inc │ │ │ ├── nmeap.h │ │ │ └── nmeap_def.h │ │ ├── src │ │ │ ├── Makefile │ │ │ ├── nmeap.mak │ │ │ └── nmeap01.c │ │ ├── tst │ │ │ ├── Makefile │ │ │ ├── test1.c │ │ │ ├── test2.c │ │ │ ├── test3.c │ │ │ ├── tst.mak │ │ │ └── wingps.c │ │ └── win32.mak │ ├── pocketbus.c │ ├── pocketbus.h │ ├── pocketcmd.c │ ├── pocketcmd.h │ ├── tftp.c │ ├── tftp.h │ ├── xmodem.c │ └── xmodem.h ├── os │ ├── hptime.c │ └── hptime.h ├── remote_merge ├── rules.mk ├── struct │ ├── bitarray.h │ ├── bitarray_test.c │ ├── fifobuf.h │ ├── hashtable.c │ ├── hashtable.h │ ├── hashtable_test.c │ ├── heap.c │ ├── heap.h │ ├── heap_test.c │ ├── kfile_fifo.c │ ├── kfile_fifo.h │ ├── kfile_fifo_test.c │ ├── kfile_mem.c │ ├── kfile_mem.h │ ├── list.h │ └── pool.h ├── verstag.c └── verstag.h ├── buildrev.h ├── discovery_aprs.project ├── discovery_aprs.workspace ├── discovery_aprs ├── .spec ├── ad.c ├── ad.h ├── cfg │ ├── cfg_adc.h │ ├── cfg_afsk.h │ ├── cfg_ax25.h │ ├── cfg_battfs.h │ ├── cfg_context_switch.h │ ├── cfg_dac.h │ ├── cfg_dataflash.h │ ├── cfg_dc_motor.h │ ├── cfg_debug.h │ ├── cfg_eeprom.h │ ├── cfg_emb_flash.h │ ├── cfg_eth.h │ ├── cfg_fat.h │ ├── cfg_flash25.h │ ├── cfg_formatwr.h │ ├── cfg_gfx.h │ ├── cfg_hashtable.h │ ├── cfg_heap.h │ ├── cfg_i2c.h │ ├── cfg_i2s.h │ ├── cfg_ini_reader.h │ ├── cfg_kbd.h │ ├── cfg_keytag.h │ ├── cfg_kfile.h │ ├── cfg_kiss.h │ ├── cfg_lcd_32122a.h │ ├── cfg_lcd_hd44.h │ ├── cfg_led_7seg.h │ ├── cfg_lm75.h │ ├── cfg_lwip.h │ ├── cfg_md2.h │ ├── cfg_monitor.h │ ├── cfg_nand.h │ ├── cfg_nmea.h │ ├── cfg_parser.h │ ├── cfg_phase.h │ ├── cfg_pocketbus.h │ ├── cfg_proc.h │ ├── cfg_pwm.h │ ├── cfg_ramp.h │ ├── cfg_randpool.h │ ├── cfg_sd.h │ ├── cfg_sem.h │ ├── cfg_ser.h │ ├── cfg_signal.h │ ├── cfg_spi_bitbang.h │ ├── cfg_stepper.h │ ├── cfg_tas5706a.h │ ├── cfg_tftp.h │ ├── cfg_thermo.h │ ├── cfg_timer.h │ ├── cfg_usb.h │ ├── cfg_usbkbd.h │ ├── cfg_usbmouse.h │ ├── cfg_usbser.h │ ├── cfg_wdt.h │ └── cfg_xmodem.h ├── core_cm3.h ├── da.c ├── da.h ├── discovery_aprs.mk ├── discovery_aprs_user.mk ├── hw │ ├── hw_adc.h │ ├── hw_afsk.c │ ├── hw_afsk.h │ ├── hw_blanker.h │ ├── hw_boot.h │ ├── hw_buzzer.h │ ├── hw_buzzerled.h │ ├── hw_cpufreq.h │ ├── hw_dataflash.c │ ├── hw_dataflash.h │ ├── hw_dc_motor.h │ ├── hw_eth.c │ ├── hw_eth.h │ ├── hw_ft245rl.h │ ├── hw_hx8347.h │ ├── hw_i2c_bitbang.h │ ├── hw_ili9225.h │ ├── hw_input.h │ ├── hw_kbd.h │ ├── hw_lcd_32122a.h │ ├── hw_lcd_hd44.h │ ├── hw_led.h │ ├── hw_led_7seg.h │ ├── hw_lm75.h │ ├── hw_mcp41.c │ ├── hw_mcp41.h │ ├── hw_ntc.c │ ├── hw_ntc.h │ ├── hw_phase.c │ ├── hw_phase.h │ ├── hw_rit128x96.h │ ├── hw_sd.h │ ├── hw_sensor.h │ ├── hw_ser.h │ ├── hw_sipo.h │ ├── hw_spi.h │ ├── hw_spi_dma.h │ ├── hw_stepper.h │ ├── hw_tas5706a.h │ ├── hw_tc520.h │ ├── hw_thermo.h │ ├── hw_timer.h │ ├── hw_tlv5618.h │ ├── hw_tmp123.h │ ├── kbd_map.h │ ├── mcp41_map.h │ ├── ntc_map.h │ ├── phase_map.h │ ├── pwm_map.h │ └── thermo_map.h ├── main.c ├── stm32f10x.h ├── stm32f10x_adc.c ├── stm32f10x_adc.h ├── stm32f10x_conf.h ├── stm32f10x_dac.c ├── stm32f10x_dac.h ├── stm32f10x_tim.c ├── stm32f10x_tim.h └── system_stm32f10x.h ├── images ├── discovery_aprs.bin ├── discovery_aprs.elf └── discovery_aprs.hex ├── openocd.cfg ├── project.bertos └── tracker ├── .spec ├── ad.c ├── ad.h ├── b91.c ├── b91.h ├── cfg ├── cfg_adc.h ├── cfg_afsk.h ├── cfg_ax25.h ├── cfg_battfs.h ├── cfg_context_switch.h ├── cfg_dac.h ├── cfg_dataflash.h ├── cfg_dc_motor.h ├── cfg_debug.h ├── cfg_eeprom.h ├── cfg_emb_flash.h ├── cfg_eth.h ├── cfg_fat.h ├── cfg_flash25.h ├── cfg_formatwr.h ├── cfg_gfx.h ├── cfg_hashtable.h ├── cfg_heap.h ├── cfg_i2c.h ├── cfg_i2s.h ├── cfg_ini_reader.h ├── cfg_kbd.h ├── cfg_keytag.h ├── cfg_kfile.h ├── cfg_kiss.h ├── cfg_lcd_32122a.h ├── cfg_lcd_hd44.h ├── cfg_led_7seg.h ├── cfg_lm75.h ├── cfg_lwip.h ├── cfg_md2.h ├── cfg_monitor.h ├── cfg_nand.h ├── cfg_nmea.h ├── cfg_parser.h ├── cfg_phase.h ├── cfg_pocketbus.h ├── cfg_proc.h ├── cfg_pwm.h ├── cfg_ramp.h ├── cfg_randpool.h ├── cfg_sd.h ├── cfg_sem.h ├── cfg_ser.h ├── cfg_signal.h ├── cfg_spi_bitbang.h ├── cfg_stepper.h ├── cfg_tas5706a.h ├── cfg_tftp.h ├── cfg_thermo.h ├── cfg_timer.h ├── cfg_usb.h ├── cfg_usbkbd.h ├── cfg_usbmouse.h ├── cfg_usbser.h ├── cfg_wdt.h └── cfg_xmodem.h ├── core_cm3.h ├── da.c ├── da.h ├── hw ├── hw_adc.h ├── hw_afsk.c ├── hw_afsk.h ├── hw_blanker.h ├── hw_boot.h ├── hw_buzzer.h ├── hw_buzzerled.h ├── hw_cpufreq.h ├── hw_dataflash.c ├── hw_dataflash.h ├── hw_dc_motor.h ├── hw_eth.c ├── hw_eth.h ├── hw_ft245rl.h ├── hw_hx8347.h ├── hw_i2c_bitbang.h ├── hw_ili9225.h ├── hw_input.h ├── hw_kbd.h ├── hw_lcd_32122a.h ├── hw_lcd_hd44.h ├── hw_led.h ├── hw_led_7seg.h ├── hw_lm75.h ├── hw_mcp41.c ├── hw_mcp41.h ├── hw_ntc.c ├── hw_ntc.h ├── hw_phase.c ├── hw_phase.h ├── hw_rit128x96.h ├── hw_sd.h ├── hw_sensor.h ├── hw_ser.h ├── hw_sipo.h ├── hw_spi.h ├── hw_spi_dma.h ├── hw_stepper.h ├── hw_tas5706a.h ├── hw_tc520.h ├── hw_thermo.h ├── hw_timer.h ├── hw_tlv5618.h ├── hw_tmp123.h ├── kbd_map.h ├── mcp41_map.h ├── ntc_map.h ├── phase_map.h ├── pwm_map.h └── thermo_map.h ├── main.c ├── nmea.c ├── nmea.h ├── sb.c ├── sb.h ├── stm32f10x.h ├── stm32f10x_adc.c ├── stm32f10x_adc.h ├── stm32f10x_conf.h ├── stm32f10x_tim.c ├── stm32f10x_tim.h ├── tracker.mk └── tracker_user.mk /.gitignore: -------------------------------------------------------------------------------- 1 | images/* 2 | obj/* 3 | testcd/* -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2009 Develer S.r.l. (http://www.develer.com/) 3 | # All rights reserved. 4 | # 5 | # Author: Lorenzo Berni 6 | # 7 | 8 | # Set to 1 for verbose build output, 0 for terse output 9 | V := 0 10 | 11 | default: all 12 | 13 | include bertos/config.mk 14 | 15 | include discovery_aprs/discovery_aprs.mk 16 | 17 | include tracker/tracker.mk 18 | 19 | include bertos/rules.mk 20 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | BeRTOS 2.7.0 [local copy] 2 | -------------------------------------------------------------------------------- /bertos/algo/mean.h: -------------------------------------------------------------------------------- 1 | #warning revise me! 2 | 3 | 4 | /** 5 | * DECLARE_SMEAN(temperature, uint8_t, uint16_t); 6 | * for (i = 0; i < TEMP_MEANS; ++i) 7 | * SMEAN_ADD(temperature, adc_get(), TEMP_MEANS); 8 | * printf("mean temperature = %d\n", SMEAN_GET(temperature)); 9 | */ 10 | 11 | /** 12 | * Instantiate a mean instance 13 | */ 14 | #define DECLARE_SMEAN(name, Type, SumType) \ 15 | struct { \ 16 | SumType sum; \ 17 | Type result; \ 18 | int count; \ 19 | } name = { 0, 0, 0 } 20 | 21 | /** 22 | * Insert a new sample into the mean. 23 | * 24 | * \note \a mean and \a max_samples are evaluated multiple times 25 | */ 26 | #define SMEAN_ADD(mean, sample, max_samples) \ 27 | do { \ 28 | (mean).sum += (sample); \ 29 | if ((mean).count++ >= (max_samples)) \ 30 | { \ 31 | (mean).result = (mean).sum / (max_samples); \ 32 | (mean).sum = 0; \ 33 | (mean).count = 0; \ 34 | } \ 35 | } while (0) 36 | 37 | /** 38 | * Return current mean value. 39 | */ 40 | #define SMEAN_GET(mean) ((mean).result) 41 | 42 | -------------------------------------------------------------------------------- /bertos/algo/rand.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 33 | * 34 | * \brief Very simple rand() algorithm. 35 | * 36 | * \author Bernie Innocenti 37 | */ 38 | 39 | #ifndef RAND_H 40 | #define RAND_H 41 | 42 | int rand(void); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_attr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for Debug module. 34 | * 35 | * 36 | * \author Daniele Basile 37 | */ 38 | 39 | #ifndef CFG_ATTR_H 40 | #define CFG_ATTR_H 41 | 42 | /// Put a function or critical code in fast memory. 43 | #define CONFIG_FAST_MEM 0 44 | 45 | 46 | #endif /* CFG_ATTR_H */ 47 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_boot.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 31 | * 32 | * \author Daniele Basile 33 | * 34 | * \brief Configuration file for bootloader module. 35 | */ 36 | 37 | #ifndef CFG_BOOT_H 38 | #define CFG_BOOT_H 39 | 40 | /// Bootloader log level 41 | #define CONFIG_BOOT_LOG_LEVEL LOG_LVL_INFO 42 | 43 | /// Bootoloader log format 44 | #define CONFIG_BOOT_LOG_FORMAT LOG_FMT_TERSE 45 | 46 | #endif /* CFG_FLASH_AT91_H */ 47 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_buzzerled.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for buzzerled module. 34 | * 35 | * 36 | * \author Daniele Basile 37 | */ 38 | 39 | #ifndef CFG_BUZZERLED_H 40 | #define CFG_BUZZERLED_H 41 | 42 | /// TODO 43 | #define CONFIG_NUM_BLDS 1 44 | 45 | 46 | #endif /* CFG_BUZZERLED_H */ 47 | 48 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_flash25.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for flash25 module. 34 | * 35 | * 36 | * \author Daniele Basile 37 | */ 38 | 39 | #ifndef CFG_FLASH25_H 40 | #define CFG_FLASH25_H 41 | 42 | /** 43 | * Eeprom memory type. 44 | * 45 | *$WIZ$ type = "enum" 46 | *$WIZ$ value_list = "flash25_list" 47 | */ 48 | #define CONFIG_FLASH25 FLASH25_AT25F2048 49 | 50 | #endif /* CFG_FALSH25_H */ 51 | 52 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_heap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for heap module. 34 | * 35 | * 36 | * \author Daniele Basile 37 | */ 38 | 39 | #ifndef CFG_HEAP_H 40 | #define CFG_HEAP_H 41 | 42 | /** 43 | * Enable malloc/free like API. 44 | * $WIZ$ type = "boolean" 45 | */ 46 | #define CONFIG_HEAP_MALLOC 1 47 | 48 | #endif /* CFG_HEAP_H */ 49 | 50 | 51 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_ini_reader.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for ini reader module. 34 | * 35 | * 36 | * \author Luca Ottaviano 37 | */ 38 | 39 | #ifndef CFG_INI_READER_H 40 | #define CFG_INI_READER_H 41 | 42 | /** 43 | * Maximum ini file line length (chars). 44 | * $WIZ$ type = "int"; min = 1 45 | */ 46 | #define CONFIG_INI_MAX_LINE_LEN 64 47 | 48 | #endif /* CFG_INI_READER_H */ 49 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_kiss.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CFG_KISS_H 3 | #define CFG_KISS_H 4 | 5 | /** 6 | * Module logging level. 7 | * 8 | * $WIZ$ type = "enum" 9 | * $WIZ$ value_list = "log_level" 10 | */ 11 | #define KISS_LOG_LEVEL LOG_LVL_ERR 12 | 13 | /** 14 | * Module logging format. 15 | * 16 | * $WIZ$ type = "enum" 17 | * $WIZ$ value_list = "log_format" 18 | */ 19 | #define KISS_LOG_FORMAT LOG_FMT_TERSE 20 | 21 | #endif /* CFG_KISS_H */ 22 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_monitor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Kernel monitor configuration parameters 34 | * 35 | * \author Bernie Innocenti 36 | */ 37 | 38 | #ifndef CFG_MONITOR_H 39 | #define CFG_MONITOR_H 40 | 41 | /** 42 | * Process monitor. 43 | * $WIZ$ type = "autoenabled" 44 | */ 45 | #define CONFIG_KERN_MONITOR 0 46 | 47 | #endif /* CFG_MONITOR_H */ 48 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_sem.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Kernel semaphores configuration parameters. 34 | * 35 | * \author Bernie Innocenti 36 | */ 37 | 38 | #ifndef CFG_SEM_H 39 | #define CFG_SEM_H 40 | 41 | /** 42 | * Re-entrant mutual exclusion primitives. 43 | * $WIZ$ type = "autoenabled" 44 | */ 45 | #define CONFIG_KERN_SEMAPHORES 0 46 | 47 | #endif /* CFG_SEM_H */ 48 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_signal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Kernel signals configuration parameters 34 | * 35 | * \author Bernie Innocenti 36 | */ 37 | 38 | #ifndef CFG_SIGNAL_H 39 | #define CFG_SIGNAL_H 40 | 41 | /** 42 | * Inter-process signals. 43 | * $WIZ$ type = "autoenabled" 44 | */ 45 | #define CONFIG_KERN_SIGNALS 0 46 | 47 | #endif /* CFG_SIGNAL_H */ 48 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_tas5706a.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for the TAS5706A module. 34 | * 35 | * \author Luca Ottaviano 36 | */ 37 | 38 | #ifndef CFG_TAS5706A_H 39 | #define CFG_TAS5706A_H 40 | 41 | /** 42 | * Maximum output volume for TAS chip [dB]. 43 | * 44 | * $WIZ$ type = "int" 45 | * $WIZ$ min = -100 46 | * $WIZ$ max = 24 47 | */ 48 | #define CONFIG_TAS_MAX_VOL -39 49 | 50 | #endif /* CFG_TAS5706A_H */ 51 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_tftp.h: -------------------------------------------------------------------------------- 1 | #ifndef CFG_TFTP_H 2 | #define CFG_TFTP_H 3 | 4 | /** 5 | * Module logging level. 6 | * 7 | * $WIZ$ type = "enum" 8 | * $WIZ$ value_list = "log_level" 9 | */ 10 | #define TFTP_LOG_LEVEL LOG_LVL_WARN 11 | 12 | /** 13 | * Module logging format. 14 | * 15 | * $WIZ$ type = "enum" 16 | * $WIZ$ value_list = "log_format" 17 | */ 18 | #define TFTP_LOG_FORMAT LOG_FMT_VERBOSE 19 | 20 | #endif /* CFG_TFTP_H */ 21 | -------------------------------------------------------------------------------- /bertos/cfg/cfg_wdt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for watchdog module. 34 | * 35 | * 36 | * \author Daniele Basile 37 | */ 38 | 39 | #ifndef CFG_WDT_H 40 | #define CFG_WDT_H 41 | 42 | /// Enable watchdog timer. $WIZ$ type = "autoenabled" 43 | #define CONFIG_WATCHDOG 0 44 | 45 | #endif /* CFG_WDT_H */ 46 | 47 | 48 | -------------------------------------------------------------------------------- /bertos/cfg/depend.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Depend module. 34 | * 35 | * \author Bernie Innocenti 36 | * 37 | */ 38 | 39 | #ifndef CFG_DEPEND_H 40 | #define CFG_DEPEND_H 41 | 42 | #include // STATIC_ASSERT() 43 | 44 | /** 45 | * Compile-time enforcement of dependencies between configuration options 46 | */ 47 | #define CONFIG_DEPEND(FEATURE, DEPS) STATIC_ASSERT(!(FEATURE) || !!(DEPS)) 48 | 49 | #endif // CFG_DEPEND_H 50 | -------------------------------------------------------------------------------- /bertos/cpu/arm/drv/adc_arm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Low-level ADC module for ARM (interface). 34 | * 35 | * \author Daniele Basile 36 | * 37 | */ 38 | 39 | #include 40 | 41 | #if CPU_ARM_AT91 42 | #include "adc_at91.h" 43 | /*#elif Add other ARM families here */ 44 | #else 45 | #error Unknown CPU 46 | #endif 47 | -------------------------------------------------------------------------------- /bertos/cpu/arm/drv/flash_arm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Low-level flash module for ARM (interface). 34 | * 35 | * \author Daniele Basile 36 | * 37 | */ 38 | 39 | #include 40 | 41 | #if CPU_ARM_AT91 42 | #include "flash_at91.h" 43 | #elif CPU_ARM_LPC2 44 | #include "flash_lpc2.h" 45 | /*#elif Add other ARM families here */ 46 | #else 47 | #error Unknown CPU 48 | #endif 49 | -------------------------------------------------------------------------------- /bertos/cpu/arm/drv/flash_lpc2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \author Daniele Basile 34 | * 35 | * \brief NPX lpc23xx embedded flash read/write driver. 36 | * 37 | * 38 | */ 39 | 40 | #ifndef FLASH_LPC2_H 41 | #define FLASH_LPC2_H 42 | 43 | 44 | #endif /* DRV_FLASH_ARM_H */ 45 | -------------------------------------------------------------------------------- /bertos/cpu/arm/drv/i2c_arm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Low-level I2C module for ARM (interface). 34 | * 35 | * \author Daniele Basile 36 | * 37 | */ 38 | 39 | #include 40 | 41 | #if CPU_ARM_AT91 42 | #include "i2c_at91.h" 43 | #elif CPU_ARM_LPC2378 44 | #include "i2c_lpc2.h" 45 | /*#elif Add other ARM families here */ 46 | #else 47 | #error Unknown CPU 48 | #endif 49 | -------------------------------------------------------------------------------- /bertos/cpu/arm/drv/i2c_at91.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Driver for the AT91SAM7X I2C (interface) 34 | * 35 | * \author Daniele Basile 36 | * 37 | */ 38 | 39 | #ifndef I2C_AT91_H 40 | #define I2C_AT91_H 41 | 42 | #include 43 | 44 | /** 45 | * \name I2C devices enum 46 | */ 47 | enum 48 | { 49 | I2C0, 50 | 51 | I2C_CNT /**< Number of serial ports */ 52 | }; 53 | 54 | #endif /* I2C_AT91_H */ 55 | -------------------------------------------------------------------------------- /bertos/cpu/arm/drv/i2c_lpc2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Driver for the LPC23xx I2C (interface) 34 | * 35 | * \author Daniele Basile 36 | * 37 | */ 38 | 39 | #ifndef I2C_LPC2_H 40 | #define I2C_LPC2_H 41 | 42 | #include 43 | 44 | /** 45 | * \name I2C devices enum 46 | */ 47 | enum 48 | { 49 | I2C0, 50 | I2C1, 51 | I2C2, 52 | 53 | I2C_CNT /**< Number of serial ports */ 54 | }; 55 | 56 | #endif /* I2C_LPC2_H */ 57 | -------------------------------------------------------------------------------- /bertos/cpu/arm/drv/kdebug_arm.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * 34 | * \author Francesco Sacchi 35 | * 36 | * \brief Low-level kdebug module for ARM (inplementation). 37 | */ 38 | 39 | #include 40 | 41 | #if CPU_ARM_AT91 42 | #include "kdebug_at91.c" 43 | #elif CPU_ARM_LPC2 44 | #include "kdebug_lpc2.c" 45 | /*#elif Add other ARM families here */ 46 | #else 47 | #error Unknown CPU 48 | #endif 49 | -------------------------------------------------------------------------------- /bertos/cpu/arm/drv/pwm_arm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Low-level PWM module for ARM (interface). 34 | * 35 | * 36 | * \author Daniele Basile 37 | * 38 | */ 39 | 40 | #include 41 | 42 | #if CPU_ARM_AT91 43 | #include "pwm_at91.h" 44 | /*#elif Add other ARM families here */ 45 | #else 46 | #error Unknown CPU 47 | #endif 48 | -------------------------------------------------------------------------------- /bertos/cpu/arm/drv/ser_arm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Low-level serial module for ARM (interface). 34 | * 35 | * 36 | * \author Daniele Basile 37 | * 38 | */ 39 | 40 | #include 41 | 42 | #if CPU_ARM_AT91 43 | #include "ser_at91.h" 44 | #elif CPU_ARM_LPC2378 45 | #include "ser_lpc2.h" 46 | /*#elif Add other ARM families here */ 47 | #else 48 | #error Unknown CPU 49 | #endif 50 | -------------------------------------------------------------------------------- /bertos/cpu/arm/drv/stepper_arm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Low-level stepper timer module for ARM (inplementation). 34 | * 35 | * 36 | * \author Daniele Basile 37 | * 38 | */ 39 | 40 | #include 41 | 42 | #if CPU_ARM_AT91 43 | #include "stepper_at91.h" 44 | /*#elif Add other ARM families here */ 45 | #else 46 | #error Unknown CPU 47 | #endif 48 | -------------------------------------------------------------------------------- /bertos/cpu/arm/drv/timer_arm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * 34 | * \author Francesco Sacchi 35 | * 36 | * \brief Low-level timer module for ARM (interface). 37 | */ 38 | 39 | #include 40 | 41 | #if CPU_ARM_AT91 42 | #include "timer_at91.h" 43 | #elif CPU_ARM_LPC2 44 | #include "timer_lpc2.h" 45 | /*#elif Add other ARM families here */ 46 | #else 47 | #error Unknown CPU 48 | #endif 49 | -------------------------------------------------------------------------------- /bertos/cpu/arm/drv/twi_arm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Low-level TWI module for ARM (interface). 34 | * 35 | * 36 | * \author Daniele Basile 37 | * 38 | */ 39 | 40 | #include 41 | 42 | #if CPU_ARM_AT91 43 | #include "twi_at91.h" 44 | /*#elif Add other ARM families here */ 45 | #else 46 | #error Unknown CPU 47 | #endif 48 | -------------------------------------------------------------------------------- /bertos/cpu/arm/hw/switch_arm.S: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if !(ARCH & ARCH_NIGHTTEST) 4 | #warning This file is deprecated, use switch_ctx_arm.S 5 | #include "switch_ctx_arm.S" 6 | #endif 7 | -------------------------------------------------------------------------------- /bertos/cpu/arm/info/at91sam7s.common: -------------------------------------------------------------------------------- 1 | # 2 | #-*- coding: utf-8 -*- 3 | # 4 | # \file 5 | # 34 | # 35 | # General CPU info denfinition for AT91SAM7X architecture. 36 | # 37 | # This file contain all info for the BeRTOS wizard. 38 | # 39 | # \author Daniele Basile 40 | # 41 | # 42 | 43 | # Import the common settings for the path. 44 | include("at91sam7.common") 45 | 46 | # Special CPU related tags. 47 | CPU_TAGS += ["at91sam7s"] 48 | -------------------------------------------------------------------------------- /bertos/cpu/arm/info/at91sam7x.common: -------------------------------------------------------------------------------- 1 | # 2 | #-*- coding: utf-8 -*- 3 | # 4 | # \file 5 | # 34 | # 35 | # General CPU info denfinition for AT91SAM7X architecture. 36 | # 37 | # This file contain all info for the BeRTOS wizard. 38 | # 39 | # \author Daniele Basile 40 | # 41 | # 42 | 43 | # Import the common settings for the path. 44 | include("at91sam7.common") 45 | 46 | # Special CPU related tags. 47 | CPU_TAGS += ["at91sam7x"] 48 | -------------------------------------------------------------------------------- /bertos/cpu/arm/io/arm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * 34 | * \author Francesco Sacchi 35 | * 36 | * ARM I/O registers. 37 | */ 38 | 39 | 40 | #ifndef ARM_H 41 | #define ARM_H 42 | 43 | #include 44 | 45 | #if CPU_ARM_AT91 46 | #include "at91.h" 47 | #elif CPU_ARM_LPC2 48 | #include "lpc23xx.h" 49 | /*#elif Add other ARM families here */ 50 | #else 51 | #error Unknown CPU 52 | #endif 53 | 54 | 55 | #endif /* ARM_H */ 56 | -------------------------------------------------------------------------------- /bertos/cpu/avr/drv/i2c_avr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Driver for the AVR ATMega TWI (implementation) 34 | * 35 | * \author Daniele Basile 36 | */ 37 | 38 | #ifndef I2C_AVR_H 39 | #define I2C_AVR_H 40 | 41 | #include 42 | 43 | /** 44 | * \name I2C devices enum 45 | */ 46 | enum 47 | { 48 | I2C0, 49 | 50 | I2C_CNT /**< Number of serial ports */ 51 | }; 52 | 53 | #endif /* I2C_LM3S_H */ 54 | 55 | -------------------------------------------------------------------------------- /bertos/cpu/avr/drv/kdebug_avr.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * 34 | * \author Luca Ottaviano 35 | * 36 | * \brief Low-level kdebug module for AVR (inplementation). 37 | */ 38 | 39 | #include 40 | 41 | #if CPU_AVR_MEGA 42 | #include "kdebug_mega.c" 43 | #elif CPU_AVR_XMEGA 44 | #include "kdebug_xmega.c" 45 | #else 46 | #error Unknown CPU 47 | #endif 48 | -------------------------------------------------------------------------------- /bertos/cpu/avr/drv/timer_simple_avr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 31 | * 32 | * \brief Simple delay routine 33 | * 34 | * \author Francesco Sacchi 35 | */ 36 | 37 | #ifndef DRV_TIMER_SIMPLE_AVR_H 38 | #define DRV_TIMER_SIMPLE_AVR_H 39 | 40 | #warning FIXME:This module is obsolete, yuo must refactor it. 41 | 42 | #if 0 43 | #include 44 | 45 | extern void timer_delay(mtime_t time); 46 | 47 | #endif /* TIMER_SIMPLE_H */ 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /bertos/cpu/avr/hw/switch_avr.S: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if !(ARCH & ARCH_NIGHTTEST) 4 | #warning This file is deprecated, use switch_ctx_avr.S 5 | #include "switch_ctx_avr.S" 6 | #endif 7 | -------------------------------------------------------------------------------- /bertos/cpu/avr/info/avr_post.common: -------------------------------------------------------------------------------- 1 | 2 | # CPU type used for flashing 3 | MK_PROGRAMMER_CPU = CORE_CPU 4 | 5 | # Name of the flag used by the build system to pass to the compiler the CPU type. 6 | MK_MCU = CORE_CPU 7 | 8 | # Add CPU core to tags 9 | CPU_TAGS += [ CORE_CPU ] 10 | -------------------------------------------------------------------------------- /bertos/cpu/avr/info/mega.common: -------------------------------------------------------------------------------- 1 | # 2 | #-*- coding: utf-8 -*- 3 | # 4 | # \file 5 | # 34 | # 35 | # General CPU info denfinition AVR family. 36 | # 37 | # This file contain all info for the BeRTOS wizard. 38 | # 39 | # \author Daniele Basile 40 | # 41 | # 42 | 43 | # Import the common settings for the path. 44 | include("avr.common") 45 | 46 | # Special CPU related tags. 47 | CPU_TAGS += ["mega"] 48 | 49 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/drv/adc_cm3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Low-level ADC module for ARM (interface). 34 | * 35 | * \author Daniele Basile 36 | * 37 | */ 38 | 39 | #include 40 | 41 | #if CPU_CM3_LM3S 42 | #include "adc_lm3s.h" 43 | #elif CPU_CM3_STM32 44 | #include "adc_stm32.h" 45 | #elif CPU_CM3_SAM3X 46 | #include "adc_sam3.h" 47 | /*#elif Add other ARM families here */ 48 | #else 49 | #error Unknown CPU 50 | #endif 51 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/drv/clock_sam3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Low-level clocking driver for SAM3. 34 | * 35 | * \author Stefano Fedrigo 36 | */ 37 | 38 | #ifndef DRV_SAM3_CLOCK_H 39 | #define DRV_SAM3_CLOCK_H 40 | 41 | void clock_init(void); 42 | 43 | #endif /* DRV_SAM3_CLOCK_H */ 44 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/drv/dac_cm3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Low-level DAC module for Cortex-m3. 34 | * 35 | * \author Daniele Basile 36 | * 37 | */ 38 | 39 | #include 40 | 41 | #if CPU_CM3_SAM3X 42 | #include "adc_sam3.h" 43 | /*#elif Add other ARM families here */ 44 | #else 45 | #error Unknown CPU 46 | #endif 47 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/drv/flash_cm3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Low-level flash module for Cortex-M3 (interface). 34 | * 35 | * \author Daniele Basile 36 | */ 37 | 38 | #include 39 | 40 | #if CPU_CM3_LM3S 41 | #include "flash_lm3s.h" 42 | #elif CPU_CM3_STM32 43 | #include "flash_stm32.h" 44 | /*#elif Add other Cortex-M3 CPUs here */ 45 | #else 46 | #error Unknown CPU 47 | #endif 48 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/drv/flash_lm3s.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief LM3S1968 internal flash memory driver. 34 | * 35 | * \author Andrea Righi 36 | */ 37 | 38 | #ifndef FLASH_LM3S_H 39 | #define FLASH_LM3S_H 40 | 41 | #endif /* FLASH_LM3S_H */ 42 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/drv/flash_stm32.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief STM32F103xx internal flash memory driver. 34 | * 35 | * \author Daniele Basile 36 | */ 37 | 38 | #ifndef FLASH_STM32_H 39 | #define FLASH_STM32_H 40 | 41 | #endif /* FLASH_STM32_H */ 42 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/drv/i2c_sam3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief TWI driver for SAM3 (interface) 34 | * 35 | * \author Stefano Fedrigo 36 | */ 37 | 38 | #ifndef DRV_I2C_SAM3_H 39 | #define DRV_I2C_SAM3_H 40 | 41 | /** 42 | * \name I2C devices enum 43 | */ 44 | enum 45 | { 46 | I2C0, 47 | I2C1, 48 | 49 | I2C_CNT /**< Number of ports */ 50 | }; 51 | 52 | #endif /* DRV_I2C_SAM3_H */ 53 | 54 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/drv/i2c_stm32.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Driver for the STM32F103xx I2C (interface) 34 | * 35 | */ 36 | 37 | #ifndef I2C_STM32_H 38 | #define I2C_STM32_H 39 | 40 | #include 41 | 42 | /** 43 | * \name I2C devices enum 44 | */ 45 | enum 46 | { 47 | I2C1, 48 | I2C2, 49 | 50 | I2C_CNT /**< Number of serial ports */ 51 | }; 52 | 53 | #endif /* I2C_STM32_H */ 54 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/drv/kdebug_lm3s.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief LM3S debug support (interface). 34 | * 35 | * \author Andrea Righi 36 | */ 37 | 38 | #ifndef DRV_KDEBUG_LM3S_H 39 | #define DRV_KDEBUG_LM3S_H 40 | 41 | #define KDEBUG_PORT_DEFAULT 0 ///< Default debug port. 42 | /* \} */ 43 | 44 | #endif /* DRV_KDEBUG_LM3S_H */ 45 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/drv/kdebug_stm32.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief STM32 debug support (interface). 34 | * 35 | * \author Andrea Righi 36 | */ 37 | 38 | #ifndef DRV_KDEBUG_STM32_H 39 | #define DRV_KDEBUG_STM32_H 40 | 41 | #define KDEBUG_PORT_DEFAULT 1 ///< Default debug port. 42 | /* \} */ 43 | 44 | #endif /* DRV_KDEBUG_STM32_H */ 45 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/drv/ser_cm3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Low-level serial module for Cortex-M3 (interface). 34 | * 35 | * \author Andrea Righi 36 | */ 37 | 38 | #include 39 | 40 | #if CPU_CM3_LM3S 41 | #include "ser_lm3s.h" 42 | #elif CPU_CM3_STM32 43 | #include "ser_stm32.h" 44 | #elif CPU_CM3_SAM3 45 | #include "ser_sam3.h" 46 | /*#elif Add other Cortex-M3 CPUs here */ 47 | #else 48 | #error Unknown CPU 49 | #endif 50 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/hw/crt_cm3_iar.S: -------------------------------------------------------------------------------- 1 | MODULE ?cstartup 2 | 3 | CONTROL_UNPRIVILEGED SET 1 4 | CONTROL_PSP SET 2 5 | 6 | AAPCS INTERWORK, VFP_COMPATIBLE, ROPI 7 | PRESERVE8 8 | 9 | SECTION .vtable:CODE:NOROOT(3) 10 | 11 | RSEG IRQ_STACK:DATA(3) 12 | RSEG CSTACK:DATA(3) 13 | RSEG DATABSS:DATA(3) 14 | 15 | EXTERN __cmain 16 | EXTERN __init2 17 | EXTERN __region_RAM_end__ 18 | PUBLIC __iar_program_start 19 | 20 | SECTION .text:CODE:REORDER(2) 21 | 22 | PUBWEAK __dummy_init 23 | __dummy_init: 24 | bx lr 25 | 26 | THUMB 27 | __iar_program_start: 28 | cpsid i 29 | ldr r0, =__region_RAM_end__ 30 | sub r0, r0, #16 31 | msr psp, r0 32 | 33 | movs r0, #CONTROL_PSP 34 | msr control, r0 35 | isb 36 | 37 | bl __init2 38 | 39 | cpsie i 40 | mov r0, #0 41 | mov r1, #0 42 | bl __cmain 43 | end: 44 | nop 45 | b end 46 | 47 | END 48 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/hw/iar_cm3.S: -------------------------------------------------------------------------------- 1 | SECTION .text:CODE(2) 2 | 3 | ; Exported functions 4 | EXPORT CPU_READ_IPSR 5 | EXPORT irq_running 6 | EXPORT asm_switch_context 7 | 8 | CPU_READ_IPSR: 9 | mrs r0, ipsr 10 | bx lr 11 | 12 | irq_running: 13 | mrs r0, msp 14 | cmp sp, r0 15 | ite ne 16 | movne r0, #0x0 17 | moveq r0, #0x1 18 | bx lr 19 | 20 | asm_switch_context: 21 | mrs r12, psp 22 | stmdb r12!, {r4-r11, lr} 23 | str r12, [r1] 24 | ldr r12, [r0] 25 | ldmia r12!, {r4-r11, lr} 26 | msr psp, r12 27 | bx lr 28 | END 29 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/hw/switch_ctx_cm3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Cortex-M3 context switch 34 | */ 35 | 36 | #ifndef SWITCH_CTX_CM3_H 37 | #define SWITCH_CTX_CM3_H 38 | 39 | #if CONFIG_KERN_PREEMPT 40 | extern void svcall_handler(void); 41 | extern void pendsv_handler(void); 42 | #endif /* CONFIG_KERN_PREEMPT */ 43 | 44 | #endif /* SWITCH_CTX_CM3_H */ 45 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/hw/vectors_cm3_iar.S: -------------------------------------------------------------------------------- 1 | MODULE ?vectors 2 | 3 | AAPCS INTERWORK, VFP_COMPATIBLE, RWPI_COMPATIBLE 4 | PRESERVE8 5 | 6 | SECTION IRQSTACK:DATA:NOROOT(3) 7 | SECTION .vtable:CODE:NOROOT(3) 8 | 9 | EXTERN __iar_program_start 10 | PUBLIC __vector_table 11 | 12 | DATA 13 | 14 | __vector_table: 15 | DCD SFE(IRQSTACK) 16 | DCD __iar_program_start 17 | DCD default_isr 18 | DCD default_isr 19 | 20 | SECTION .text:CODE:REORDER(1) 21 | THUMB 22 | 23 | default_isr: 24 | nop 25 | b default_isr 26 | 27 | END 28 | -------------------------------------------------------------------------------- /bertos/cpu/cortex-m3/io/stm32_pwr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief STM32 Power Control. 34 | * 35 | * \author Andrea Righi 36 | */ 37 | #ifndef STM32_PWR_H 38 | #define STM32_PWR_H 39 | 40 | #include 41 | 42 | /* Power Control */ 43 | struct PWR 44 | { 45 | reg32_t CR; 46 | reg32_t CSR; 47 | }; 48 | 49 | #define PWR_CR_DBP 0x00000100 50 | 51 | #endif /* STM32_PWR_H */ 52 | -------------------------------------------------------------------------------- /bertos/cpu/msp430/info/msp430_post.common: -------------------------------------------------------------------------------- 1 | # CPU type used for flashing 2 | MK_PROGRAMMER_CPU = CORE_CPU 3 | 4 | # Name of the flag used by the build system to pass to the compiler the CPU type. 5 | MK_MCU = CORE_CPU 6 | 7 | # Add CPU core to tags 8 | CPU_TAGS += [ CORE_CPU ] 9 | -------------------------------------------------------------------------------- /bertos/cpu/newcore: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIRS="drv hw io scripts" 4 | if [ $# != 1 ]; then 5 | echo "Create a new core tree with subdirs:" 6 | echo $DIRS 7 | echo "usage $0 " 8 | exit 1 9 | fi 10 | CORE=$1 11 | mkdir $CORE 12 | cd $CORE 13 | for dir in $DIRS 14 | do 15 | mkdir $dir 16 | done 17 | cd .. 18 | -------------------------------------------------------------------------------- /bertos/cpu/path.common: -------------------------------------------------------------------------------- 1 | # 2 | #-*- coding: utf-8 -*- 3 | # 4 | # \file 5 | # 34 | # 35 | # BeRTOS common path info. 36 | # 37 | # This file contain all info for the BeRTOS wizard. 38 | # 39 | # \author Daniele Basile 40 | # 41 | # 42 | 43 | # BeRTOS cpu directory 44 | CPU_DIR = "bertos/cpu/" 45 | 46 | PRG_SCRIPTS_DIR = "bertos/prg_scripts/" 47 | -------------------------------------------------------------------------------- /bertos/emul/emul.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2007 Bernie Innocenti (http://www.codewiz.org/) 3 | # All rights reserved. 4 | # 5 | # Author: Bernie Innocenti 6 | # 7 | # Qt configuration for BeRTOS emulator. Include it from 8 | # your app Makefile fragment 9 | 10 | #On Darwin architecture environment variables need a different configuration. 11 | ifeq ($(shell uname | grep -c "Darwin"),1) 12 | EMUL_CFLAGS = -D'ARCH=(ARCH_EMUL|ARCH_QT)' -DQT_CLEAN_NAMESPACE 13 | EMUL_LDFLAGS = -framework QtGui -framework QtCore 14 | QT_MOC = /usr/bin/moc 15 | #On other platforms. 16 | else 17 | EMUL_CFLAGS = -D'ARCH=(ARCH_EMUL|ARCH_QT)' $(shell pkg-config QtCore QtGui --cflags) -DQT_CLEAN_NAMESPACE 18 | EMUL_LDFLAGS = $(shell pkg-config QtCore QtGui --libs) 19 | QT_MOC = $(shell pkg-config QtCore --variable=moc_location) 20 | #QT_UIC = $(shell pkg-config QtCore --variable=uic_location) 21 | endif 22 | 23 | -------------------------------------------------------------------------------- /bertos/emul/switch.S: -------------------------------------------------------------------------------- 1 | #warning This file is deprecated, use switch_ctx_emul.S 2 | #include "switch_ctx_emul.S" 3 | -------------------------------------------------------------------------------- /bertos/emul/switch_ctx_emul.S: -------------------------------------------------------------------------------- 1 | #if defined(__i386__) 2 | #include "switch_i386.S" 3 | #elif defined(__x86_64__) 4 | #include "switch_x86_64.s" 5 | #elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) 6 | #include "switch_ppc.S" 7 | #else 8 | #error Unknown CPU 9 | #endif 10 | 11 | -------------------------------------------------------------------------------- /bertos/fonts/fixed6x8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robots/APRS/f281a283bffac9a7e002024898d91431337c6bda/bertos/fonts/fixed6x8.c -------------------------------------------------------------------------------- /bertos/fonts/fonts.mk: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: fonts.mk 1532 2008-08-04 07:21:26Z bernie $ 3 | # Copyright 2003, 2004, 2005, 2006 Develer S.r.l. (http://www.develer.com/) 4 | # All rights reserved. 5 | # 6 | # Makefile fragment for DevLib demo application. 7 | # 8 | # Author: Bernie Innocenti 9 | # 10 | 11 | %.c: %.bdf 12 | bertos/fonts/convbdf $< > $@ 13 | -------------------------------------------------------------------------------- /bertos/fs/fatfs/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _INTEGER 6 | 7 | #include 8 | 9 | #if 0 10 | #include 11 | #else 12 | 13 | /* These types must be 16-bit, 32-bit or larger integer */ 14 | typedef int INT; 15 | typedef unsigned UINT; 16 | 17 | /* These types must be 8-bit integer */ 18 | typedef int8_t CHAR; 19 | typedef uint8_t UCHAR; 20 | typedef uint8_t BYTE; 21 | 22 | /* These types must be 16-bit integer */ 23 | typedef int16_t SHORT; 24 | typedef uint16_t USHORT; 25 | typedef uint16_t WORD; 26 | typedef uint16_t WCHAR; 27 | 28 | /* These types must be 32-bit integer */ 29 | typedef int32_t LONG; 30 | typedef uint32_t ULONG; 31 | typedef uint32_t DWORD; 32 | 33 | /* Boolean type */ 34 | typedef enum { FALSE = 0, TRUE } BOOL; 35 | 36 | #endif 37 | 38 | #define _INTEGER 39 | #endif 40 | -------------------------------------------------------------------------------- /bertos/gui/levelbar.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * Copyright 2004, 2006 Develer S.r.l. (http://www.develer.com/) 4 | * 5 | * 6 | * \author Stefano Fedrigo 7 | * 8 | * \brief Graphics level bar widget 9 | */ 10 | 11 | #ifndef GUI_LEVELBAR_H 12 | #define GUI_LEVELBAR_H 13 | 14 | #include 15 | 16 | 17 | /** Type of levelbar */ 18 | #define LBAR_HORIZONTAL 1 19 | #define LBAR_VERTICAL 2 20 | 21 | typedef struct LevelBar 22 | { 23 | struct Bitmap *bitmap; 24 | int type; 25 | int pos; ///< Current level 26 | int min; ///< Minimum level 27 | int max; ///< Maximum level 28 | coord_t x1, y1, x2, y2; ///< Position of widget in the bitmap 29 | } LevelBar; 30 | 31 | void lbar_init(struct LevelBar *lb, struct Bitmap *bmp, int type, int min, int max, int pos, 32 | coord_t x1, coord_t y1, coord_t x2, coord_t y2); 33 | void lbar_setLevel(struct LevelBar *lb, int level); 34 | int lbar_getLevel(struct LevelBar *lb); 35 | void lbar_changeLevel(struct LevelBar *lb, int delta); 36 | void lbar_setMax(struct LevelBar *lb, int max); 37 | void lbar_draw(struct LevelBar *lb); 38 | 39 | #endif /* GUI_LEVELBAR_H */ 40 | -------------------------------------------------------------------------------- /bertos/hw/hw_buzzerled.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Buzzerled hardware-specific definitions 34 | * 35 | * 36 | * \author Daniele Basile 37 | */ 38 | 39 | 40 | #ifndef HW_BUZZERLED_H 41 | #define HW_BUZZERLED_H 42 | 43 | #warning TODO:This is an example implementation, you must implement it! 44 | 45 | 46 | #endif /* HW_BUZZERLED_H */ 47 | -------------------------------------------------------------------------------- /bertos/hw/hw_dataflash.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Dataflash HW control routines (interface). 34 | * 35 | * \author Francesco Sacchi 36 | */ 37 | 38 | #ifndef HW_DATAFLASH_H 39 | #define HW_DATAFLASH_H 40 | 41 | #include 42 | 43 | void dataflash_hw_init(void); 44 | void dataflash_hw_setCS(bool enable); 45 | void dataflash_hw_setReset(bool enable); 46 | 47 | #endif /* HW_DATAFLASH_H */ 48 | -------------------------------------------------------------------------------- /bertos/hw/hw_eth.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief MAC address definition 34 | * 35 | * \author Luca Ottaviano 36 | */ 37 | 38 | #include "hw/hw_eth.h" 39 | 40 | uint8_t mac_addr[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }; 41 | -------------------------------------------------------------------------------- /bertos/hw/hw_eth.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief MAC address definition 34 | * 35 | * \author Luca Ottaviano 36 | */ 37 | #ifndef HW_ETH_H 38 | #define HW_ETH_H 39 | 40 | #include 41 | 42 | extern uint8_t mac_addr[6]; 43 | 44 | #endif // HW_ETH_H 45 | -------------------------------------------------------------------------------- /bertos/hw/hw_input.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 33 | * 34 | * \brief Macro for HW_INPUT_H 35 | * 36 | * \author Andrea Grandi 37 | */ 38 | 39 | #ifndef HW_INPUT_H 40 | #define HW_INPUT_H 41 | 42 | #warning FIXME: This is an example implementation, you must implement it 43 | 44 | #define INPUT_INIT() do { /* implement me */} while(0) 45 | 46 | #endif /* HW_INPUT_H */ 47 | -------------------------------------------------------------------------------- /bertos/hw/hw_lm75.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Hardware macro definition. 34 | * 35 | * \author Daniele Basile 36 | */ 37 | 38 | #ifndef HW_LM75_H 39 | #define HW_LM75_H 40 | 41 | #warning TODO:This is an example implentation, you must implement it! 42 | 43 | #define LM75_HW_INIT() \ 44 | do { \ 45 | /* Pin init */\ 46 | } while (0) 47 | 48 | #endif /* HW_LM75_H */ 49 | 50 | -------------------------------------------------------------------------------- /bertos/hw/hw_ntc.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief NTC hardware-specific definition 34 | * 35 | * \author Lorenzo Berni 36 | * 37 | */ 38 | 39 | #include 40 | #include "hw/ntc_map.h" 41 | 42 | const res_t NTC_RSER[NTC_CNT]; 43 | const res_t NTC_RPAR[NTC_CNT]; 44 | const amp_t NTC_AMP[NTC_CNT]; 45 | const NtcHwInfo* NTC_INFO[NTC_CNT]; 46 | -------------------------------------------------------------------------------- /bertos/hw/hw_phase.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Phase control hardware-specific definitions 34 | * 35 | * \author Francesco Sacchi 36 | */ 37 | 38 | #ifndef HW_PHASE_H 39 | #define HW_PHASE_H 40 | 41 | #include "hw/hw_phase.h" 42 | 43 | #warning TODO:This is an example implementation, you must implement it! 44 | 45 | #endif /* HW_PHASE_H */ 46 | -------------------------------------------------------------------------------- /bertos/icons/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: Makefile 18234 2007-10-08 13:39:48Z rasky $ 3 | # Copyright 2004, 2006 Develer S.r.l. (http://www.develer.com/) 4 | # All rights reserved. 5 | # 6 | # Author: Stefano Fedrigo 7 | # 8 | # $Log$ 9 | # Revision 1.2 2006/09/20 14:18:01 marco 10 | # Use only icons neede by demo. 11 | # 12 | # Revision 1.1 2006/09/19 17:48:00 bernie 13 | # Add temporary logo. 14 | # 15 | # 16 | 17 | # Set to 1 for debug builds 18 | DEBUG = 1 19 | 20 | RASTERS = logo.raster 21 | 22 | FLIPIMAGE = flipimage 23 | flipimage_SRC = flipimage.cpp 24 | flipimage_OBJ = $(flipimage_SRC:%.cpp=%.o) 25 | 26 | .PHONY: all 27 | all: $(RASTERS) 28 | 29 | # Link rule 30 | $(FLIPIMAGE): $(flipimage_OBJ) 31 | $(CXX) $^ $(flipimage_LIBS) $(LDFLAGS) -o $@ 32 | 33 | .PHONY: clean 34 | clean: 35 | rm -f $(TRG) $(flipimage_OBJ) 36 | rm -f $(RASTERS) 37 | 38 | .PHONY: rasters 39 | rasters: $(FLIPIMAGE) $(RASTERS) 40 | 41 | %.raster: %.png $(FLIPIMAGE) 42 | convert $< txt:- | ./flipimage >$@ 43 | 44 | # Include dependencies 45 | -include *.d 46 | -------------------------------------------------------------------------------- /bertos/icons/logo.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const struct Image bertos_logo; 4 | -------------------------------------------------------------------------------- /bertos/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robots/APRS/f281a283bffac9a7e002024898d91431337c6bda/bertos/icons/logo.png -------------------------------------------------------------------------------- /bertos/kern/coop.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | */ 33 | -------------------------------------------------------------------------------- /bertos/kern/irq.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 31 | * 32 | * \brief Process scheduler (public interface). 33 | * 34 | * \author Bernie Innocenti 35 | */ 36 | #ifndef KERN_IRQ_H 37 | #define KERN_IRQ_H 38 | 39 | void irq_entry(int irq); 40 | void irq_register(int irq, void (*handler)(void)); 41 | void irq_init(void); 42 | 43 | #endif // KERN_IRQ_H 44 | -------------------------------------------------------------------------------- /bertos/kern/kfile.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * notest: all 33 | * 34 | */ 35 | 36 | #warning "This file is deprecated, include the new " 37 | #include 38 | -------------------------------------------------------------------------------- /bertos/kern/preempt.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | */ 33 | -------------------------------------------------------------------------------- /bertos/mware/blanker.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Display Blanker (implementation). 34 | * 35 | * 36 | * \author Bernie Innocenti 37 | */ 38 | #ifndef MWARE_BLANKER_H 39 | #define MWARE_BLANKER_H 40 | 41 | extern void blk_enable(void); 42 | extern void blk_disable(void); 43 | extern void blk_retrigger(void); 44 | 45 | #endif /* MWARE_BLANKER_H */ 46 | -------------------------------------------------------------------------------- /bertos/mware/byteorder.h: -------------------------------------------------------------------------------- 1 | #warning This header is OBSOLETE 2 | #include 3 | -------------------------------------------------------------------------------- /bertos/mware/hex.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 31 | * 32 | * \brief Poor man's hex arrays (implementation). 33 | * 34 | * \author Bernie Innocenti 35 | */ 36 | 37 | 38 | #include "hex.h" 39 | 40 | const char hex_tab[16] = { '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' }; 41 | const char HEX_tab[16] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' }; 42 | -------------------------------------------------------------------------------- /bertos/mware/hex.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Poor man's hex arrays (implementation). 34 | * 35 | * 36 | * \author Bernie Innocenti 37 | */ 38 | 39 | #ifndef MWARE_HEX_H 40 | #define MWARE_HEX_H 41 | 42 | extern const char hex_tab[16]; 43 | extern const char HEX_tab[16]; 44 | 45 | #endif /* MWARE_HEX_H */ 46 | -------------------------------------------------------------------------------- /bertos/mware/pgm.h: -------------------------------------------------------------------------------- 1 | #warning This header is OBSOLETE 2 | #include 3 | -------------------------------------------------------------------------------- /bertos/mware/rle.h: -------------------------------------------------------------------------------- 1 | #warning This header is OBSOLETE 2 | #include 3 | -------------------------------------------------------------------------------- /bertos/net/kiss.h: -------------------------------------------------------------------------------- 1 | #ifndef KISS_h_ 2 | #define KISS_h_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #define KISS_QUEUE 5 14 | 15 | #define KISS_FEND 0xc0 16 | #define KISS_FESC 0xdb 17 | #define KISS_TFEND 0xdc 18 | #define KISS_TFESC 0xdd 19 | 20 | enum { 21 | KISS_CMD_DATA = 0, 22 | KISS_CMD_TXDELAY, 23 | KISS_CMD_P, 24 | KISS_CMD_SlotTime, 25 | KISS_CMD_TXtail, 26 | KISS_CMD_FullDuplex, 27 | KISS_CMD_SetHardware, 28 | KISS_CMD_Return = 0xff 29 | }; 30 | 31 | enum { 32 | KISS_DUPLEX_HALF = 0, 33 | KISS_DUPLEX_FULL 34 | }; 35 | 36 | enum { 37 | KISS_QUEUE_IDLE, 38 | KISS_QUEUE_DELAYED, 39 | }; 40 | 41 | typedef void (*kiss_in_callback_t)(uint8_t *buf, size_t len); 42 | 43 | struct Kiss_msg { 44 | uint8_t buf[ CONFIG_AX25_FRAME_BUF_LEN ]; 45 | size_t pos; // next byte to fill 46 | ticks_t last_tick; // timestamp of last byte into buf 47 | }; 48 | 49 | void kiss_init(Serial *ser, AX25Ctx *ax25, Afsk *afsk); 50 | void kiss_set_in_callback(uint8_t port, kiss_in_callback_t fnc); 51 | void kiss_serial_poll(void); 52 | void kiss_queue_message(uint8_t *buf, size_t len); 53 | void kiss_queue_process(void); 54 | void kiss_send_host(uint8_t ch, uint8_t *buf, size_t len); 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /bertos/net/lwip.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * \brief lwIP TCP/IP stack module 33 | * 34 | * \author Andrea Righi 35 | * 36 | * $WIZ$ module_name = "lwip" 37 | * $WIZ$ module_configuration = "bertos/cfg/cfg_lwip.h" 38 | * $WIZ$ module_depends = "kern", "signal", "msg", "event", "eth" 39 | */ 40 | 41 | #ifndef NET_LWIP_H 42 | #define NET_LWIP_H 43 | 44 | #include "cfg/cfg_lwip.h" 45 | 46 | #endif /* NET_LWIP_H */ 47 | -------------------------------------------------------------------------------- /bertos/net/lwip/CHANGELOG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robots/APRS/f281a283bffac9a7e002024898d91431337c6bda/bertos/net/lwip/CHANGELOG -------------------------------------------------------------------------------- /bertos/net/lwip/COPYING: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, 2002 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | 34 | -------------------------------------------------------------------------------- /bertos/net/lwip/FILES: -------------------------------------------------------------------------------- 1 | src/ - The source code for the lwIP TCP/IP stack. 2 | doc/ - The documentation for lwIP. 3 | 4 | See also the FILES file in each subdirectory. 5 | -------------------------------------------------------------------------------- /bertos/net/lwip/doc/FILES: -------------------------------------------------------------------------------- 1 | savannah.txt - How to obtain the current development source code. 2 | contrib.txt - How to contribute to lwIP as a developer. 3 | rawapi.txt - The documentation for the core API of lwIP. 4 | Also provides an overview about the other APIs and multithreading. 5 | snmp_agent.txt - The documentation for the lwIP SNMP agent. 6 | sys_arch.txt - The documentation for a system abstraction layer of lwIP. 7 | -------------------------------------------------------------------------------- /bertos/net/lwip/src/FILES: -------------------------------------------------------------------------------- 1 | api/ - The code for the high-level wrapper API. Not needed if 2 | you use the lowel-level call-back/raw API. 3 | 4 | core/ - The core of the TPC/IP stack; protocol implementations, 5 | memory and buffer management, and the low-level raw API. 6 | 7 | include/ - lwIP include files. 8 | 9 | netif/ - Generic network interface device drivers are kept here, 10 | as well as the ARP module. 11 | 12 | For more information on the various subdirectories, check the FILES 13 | file in each directory. 14 | -------------------------------------------------------------------------------- /bertos/net/lwip/src/core/ipv6/README: -------------------------------------------------------------------------------- 1 | IPv6 support in lwIP is very experimental. 2 | -------------------------------------------------------------------------------- /bertos/net/lwip/src/include/arch/perf.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_PERF_H 2 | #define LWIP_PERF_H 3 | 4 | #define PERF_START 5 | #define PERF_STOP 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /bertos/net/lwip/src/include/lwipopts.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for lwip network module. 34 | * 35 | * \author Luca Ottaviano 36 | */ 37 | #ifndef LWIPOPTS_H 38 | #define LWIPOPTS_H 39 | 40 | #include "cfg/cfg_lwip.h" 41 | 42 | #endif /* LWIPOPTS_H */ 43 | -------------------------------------------------------------------------------- /bertos/net/lwip/src/include/netif/ethernetif.h: -------------------------------------------------------------------------------- 1 | #ifndef ETHERNETIF_H 2 | #define ETHERNETIF_H 3 | 4 | #include 5 | err_t ethernetif_init(struct netif *netif); 6 | 7 | #endif /* ETHERNETIF_H */ 8 | -------------------------------------------------------------------------------- /bertos/net/lwip/src/netif/FILES: -------------------------------------------------------------------------------- 1 | This directory contains generic network interface device drivers that 2 | do not contain any hardware or architecture specific code. The files 3 | are: 4 | 5 | etharp.c 6 | Implements the ARP (Address Resolution Protocol) over 7 | Ethernet. The code in this file should be used together with 8 | Ethernet device drivers. Note that this module has been 9 | largely made Ethernet independent so you should be able to 10 | adapt this for other link layers (such as Firewire). 11 | 12 | ethernetif.c 13 | An example of how an Ethernet device driver could look. This 14 | file can be used as a "skeleton" for developing new Ethernet 15 | network device drivers. It uses the etharp.c ARP code. 16 | 17 | loopif.c 18 | A "loopback" network interface driver. It requires configuration 19 | through the define LWIP_LOOPIF_MULTITHREADING (see opt.h). 20 | 21 | slipif.c 22 | A generic implementation of the SLIP (Serial Line IP) 23 | protocol. It requires a sio (serial I/O) module to work. 24 | 25 | ppp/ Point-to-Point Protocol stack 26 | The PPP stack has been ported from ucip (http://ucip.sourceforge.net). 27 | It matches quite well to pppd 2.3.1 (http://ppp.samba.org), although 28 | compared to that, it has some modifications for embedded systems and 29 | the source code has been reordered a bit. -------------------------------------------------------------------------------- /bertos/net/lwip/test/unit/lwip_check.h: -------------------------------------------------------------------------------- 1 | #ifndef __LWIP_CHECK_H__ 2 | #define __LWIP_CHECK_H__ 3 | 4 | /* Common header file for lwIP unit tests using the check framework */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #define FAIL_RET() do { fail(); return; } while(0) 11 | #define EXPECT(x) fail_unless(x) 12 | #define EXPECT_RET(x) do { fail_unless(x); if(!(x)) { return; }} while(0) 13 | #define EXPECT_RETX(x, y) do { fail_unless(x); if(!(x)) { return y; }} while(0) 14 | #define EXPECT_RETNULL(x) EXPECT_RETX(x, NULL) 15 | 16 | /** typedef for a function returning a test suite */ 17 | typedef Suite* (suite_getter_fn)(void); 18 | 19 | /** Create a test suite */ 20 | static Suite* create_suite(const char* name, TFun *tests, size_t num_tests, SFun setup, SFun teardown) 21 | { 22 | size_t i; 23 | Suite *s = suite_create(name); 24 | 25 | for(i = 0; i < num_tests; i++) { 26 | // Core test case 27 | TCase *tc_core = tcase_create("Core"); 28 | if ((setup != NULL) || (teardown != NULL)) { 29 | tcase_add_checked_fixture(tc_core, setup, teardown); 30 | } 31 | tcase_add_test(tc_core, tests[i]); 32 | suite_add_tcase(s, tc_core); 33 | } 34 | return s; 35 | } 36 | 37 | #endif /* __LWIP_CHECK_H__ */ 38 | -------------------------------------------------------------------------------- /bertos/net/lwip/test/unit/lwip_unittests.c: -------------------------------------------------------------------------------- 1 | #include "lwip_check.h" 2 | 3 | #include "udp/test_udp.h" 4 | #include "tcp/test_tcp.h" 5 | #include "tcp/test_tcp_oos.h" 6 | 7 | #include "lwip/init.h" 8 | 9 | 10 | int main() 11 | { 12 | int number_failed; 13 | SRunner *sr; 14 | size_t i; 15 | suite_getter_fn* suites[] = { 16 | udp_suite, 17 | tcp_suite, 18 | tcp_oos_suite, 19 | }; 20 | size_t num = sizeof(suites)/sizeof(void*); 21 | LWIP_ASSERT("No suites defined", num > 0); 22 | 23 | lwip_init(); 24 | 25 | sr = srunner_create((suites[0])()); 26 | for(i = 1; i < num; i++) { 27 | srunner_add_suite(sr, ((suite_getter_fn*)suites[i])()); 28 | } 29 | 30 | #ifdef LWIP_UNITTESTS_NOFORK 31 | srunner_set_fork_status(sr, CK_NOFORK); 32 | #endif 33 | #ifdef LWIP_UNITTESTS_FORK 34 | srunner_set_fork_status(sr, CK_FORK); 35 | #endif 36 | 37 | srunner_run_all(sr, CK_NORMAL); 38 | number_failed = srunner_ntests_failed(sr); 39 | srunner_free(sr); 40 | return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 41 | } 42 | 43 | -------------------------------------------------------------------------------- /bertos/net/lwip/test/unit/tcp/tcp_helper.h: -------------------------------------------------------------------------------- 1 | #ifndef __TCP_HELPER_H__ 2 | #define __TCP_HELPER_H__ 3 | 4 | #include "../lwip_check.h" 5 | #include "lwip/arch.h" 6 | #include "lwip/tcp.h" 7 | 8 | /* counters used for test_tcp_counters_* callback functions */ 9 | struct test_tcp_counters { 10 | u32_t recv_calls; 11 | u32_t recved_bytes; 12 | u32_t recv_calls_after_close; 13 | u32_t recved_bytes_after_close; 14 | u32_t close_calls; 15 | u32_t err_calls; 16 | err_t last_err; 17 | char* expected_data; 18 | u32_t expected_data_len; 19 | }; 20 | 21 | /* Helper functions */ 22 | void tcp_remove_all(void); 23 | 24 | struct pbuf* tcp_create_segment(struct ip_addr* src_ip, struct ip_addr* dst_ip, 25 | u16_t src_port, u16_t dst_port, void* data, size_t data_len, 26 | u32_t seqno, u32_t ackno, u8_t headerflags); 27 | struct pbuf* tcp_create_rx_segment(struct tcp_pcb* pcb, void* data, size_t data_len, 28 | u32_t seqno_offset, u32_t ackno_offset, u8_t headerflags); 29 | void tcp_set_state(struct tcp_pcb* pcb, enum tcp_state state, struct ip_addr* local_ip, 30 | struct ip_addr* remote_ip, u16_t local_port, u16_t remote_port); 31 | void test_tcp_counters_err(void* arg, err_t err); 32 | err_t test_tcp_counters_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t err); 33 | 34 | struct tcp_pcb* test_tcp_new_counters_pcb(struct test_tcp_counters* counters); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /bertos/net/lwip/test/unit/tcp/test_tcp.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_TCP_H__ 2 | #define __TEST_TCP_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /bertos/net/lwip/test/unit/tcp/test_tcp_oos.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_TCP_OOS_H__ 2 | #define __TEST_TCP_OOS_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_oos_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /bertos/net/lwip/test/unit/udp/test_udp.c: -------------------------------------------------------------------------------- 1 | #include "test_udp.h" 2 | 3 | #include "lwip/udp.h" 4 | #include "lwip/stats.h" 5 | 6 | #if !LWIP_STATS || !UDP_STATS || !MEMP_STATS 7 | #error "This tests needs UDP- and MEMP-statistics enabled" 8 | #endif 9 | 10 | /* Helper functions */ 11 | static void 12 | udp_remove_all(void) 13 | { 14 | struct udp_pcb *pcb = udp_pcbs; 15 | struct udp_pcb *pcb2; 16 | 17 | while(pcb != NULL) { 18 | pcb2 = pcb; 19 | pcb = pcb->next; 20 | udp_remove(pcb2); 21 | } 22 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0); 23 | } 24 | 25 | /* Setups/teardown functions */ 26 | 27 | static void 28 | udp_setup(void) 29 | { 30 | udp_remove_all(); 31 | } 32 | 33 | static void 34 | udp_teardown(void) 35 | { 36 | udp_remove_all(); 37 | } 38 | 39 | 40 | /* Test functions */ 41 | 42 | START_TEST(test_udp_new_remove) 43 | { 44 | struct udp_pcb* pcb; 45 | LWIP_UNUSED_ARG(_i); 46 | 47 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0); 48 | 49 | pcb = udp_new(); 50 | fail_unless(pcb != NULL); 51 | if (pcb != NULL) { 52 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 1); 53 | udp_remove(pcb); 54 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0); 55 | } 56 | } 57 | END_TEST 58 | 59 | START_TEST(test_udp_remove) 60 | { 61 | struct udp_pcb* pcb; 62 | LWIP_UNUSED_ARG(_i); 63 | 64 | pcb = NULL; 65 | //pcb = udp_new(); 66 | //fail_unless(pcb != NULL); 67 | } 68 | END_TEST 69 | 70 | 71 | /** Create the suite including all tests for this module */ 72 | Suite * 73 | udp_suite(void) 74 | { 75 | TFun tests[] = { 76 | test_udp_new_remove, 77 | test_udp_remove 78 | }; 79 | return create_suite("UDP", tests, sizeof(tests)/sizeof(TFun), udp_setup, udp_teardown); 80 | } 81 | -------------------------------------------------------------------------------- /bertos/net/lwip/test/unit/udp/test_udp.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_UDP_H__ 2 | #define __TEST_UDP_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* udp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /bertos/net/nmeap/COPYING: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2005, David M Howard (daveh at dmh2000.com) 3 | All rights reserved. 4 | 5 | This product is licensed for use and distribution under the BSD Open Source License: 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in 14 | the documentation and/or other materials provided with the distribution. 15 | * Neither the name of the copyright holders nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 24 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 25 | OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 26 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 28 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 29 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | -------------------------------------------------------------------------------- /bertos/net/nmeap/Makefile: -------------------------------------------------------------------------------- 1 | # rules 2 | export CC=gcc 3 | export CDEFS = -DNDEBUG 4 | 5 | # directories 6 | BASE :=$(shell pwd) 7 | export SRC=$(BASE)/src 8 | export TST=$(BASE)/tst 9 | export INC=$(BASE)/inc 10 | export LIB=$(BASE)/lib 11 | 12 | all : 13 | cd $(SRC) && $(MAKE) all 14 | cd $(TST) && $(MAKE) all 15 | 16 | 17 | clean : 18 | cd $(SRC) && $(MAKE) clean 19 | cd $(TST) && $(MAKE) clean 20 | 21 | doc : 22 | doxygen 23 | 24 | -------------------------------------------------------------------------------- /bertos/net/nmeap/README: -------------------------------------------------------------------------------- 1 | NMEAP is licensed under the BSD Open Source License. See the file COPYING for terms of the license 2 | 3 | VERSION 0.2 - bug fixes and tutorial 4 | a. fixed a bug in test3.c 5 | b. added a tutorial in doc/tutorial.html 6 | 7 | Installation: 8 | 9 | Unpack the tarball or zip file into the desired working directory. 10 | 11 | Building: 12 | 13 | Under Linux, execute 'make' from the top level directory. 14 | 15 | Under Win32, execute 'nmake -f win32.mak' from the top level directory 16 | 17 | Using: 18 | 19 | This library is statically linked to the application. Just include it in 20 | your linker command line. See the file 'nmeap.h' and the examples in the 21 | 'tst' directory for usage instructions. 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /bertos/net/nmeap/src/Makefile: -------------------------------------------------------------------------------- 1 | # specify compiler flags 2 | CFLAGS = -I $(INC) $(CDEFS) -g -O0 -Werror -Wall 3 | 4 | # set library name 5 | LIBNAME = libnmeap.a 6 | 7 | COBJ = nmeap01.o 8 | 9 | INCLUDES= $(INC)/nmeap.h $(INC)/nmeap_def.h 10 | 11 | # build everything 12 | all : $(LIB)/$(LIBNAME) 13 | 14 | # build the library 15 | $(LIB)/$(LIBNAME) : $(COBJ) 16 | -$(RM) $(LIB)/$(LIBNAME) 17 | $(AR) -q $(LIB)/$(LIBNAME) $(COBJ) 18 | 19 | # build all c files into .o files 20 | $(COBJ): %.o: %.c 21 | $(CC) -c $(CFLAGS) $(SRC)/$< -o $@ 22 | 23 | # erase all intermediate and output files 24 | clean : 25 | -$(RM) *.o 26 | -$(RM) *~ 27 | -$(RM) $(LIB)/$(LIBNAME) 28 | 29 | # include file dependencies 30 | $(COBJ) : $(INCLUDES) 31 | 32 | -------------------------------------------------------------------------------- /bertos/net/nmeap/src/nmeap.mak: -------------------------------------------------------------------------------- 1 | INCLUDES= ..\inc\nmeap.h ..\inc\nmeap_def.h 2 | CSRC = nmeap01.c 3 | LIBNAME = ..\lib\libnmeap.lib 4 | 5 | # build everything 6 | all : $(LIBNAME) 7 | 8 | $(LIBNAME) : nmeap01.obj 9 | -erase $(LIBNAME) 10 | lib /OUT:$(LIBNAME) nmeap01.obj 11 | 12 | nmeap01.obj : nmeap01.c $(INCLUDES) 13 | cl /DNDEBUG /c /I..\inc nmeap01.c 14 | 15 | # erase all intermediate and output files 16 | clean : 17 | -erase *.obj 18 | -erase $(LIBNAME) 19 | 20 | 21 | -------------------------------------------------------------------------------- /bertos/net/nmeap/tst/Makefile: -------------------------------------------------------------------------------- 1 | all : test1 test2 test3 2 | 3 | test1 : $(LIB)/libnmeap.a $(TST)/test1.c 4 | gcc -g -O0 -I $(INC) $(CDEFS) -Wall -Werror -o test1 $(TST)/test1.c $(LIB)/libnmeap.a 5 | 6 | test2 : $(LIB)/libnmeap.a $(TST)/test2.c 7 | gcc -g -O0 -I $(INC) $(CDEFS) -Wall -Werror -o test2 $(TST)/test2.c $(LIB)/libnmeap.a 8 | 9 | test3 : $(LIB)/libnmeap.a $(TST)/test3.c 10 | gcc -g -O0 -I $(INC) $(CDEFS) -Wall -Werror -o test3 $(TST)/test3.c $(LIB)/libnmeap.a 11 | 12 | clean: 13 | -$(RM) test1 14 | -$(RM) test2 15 | -$(RM) test3 16 | 17 | 18 | -------------------------------------------------------------------------------- /bertos/net/nmeap/tst/tst.mak: -------------------------------------------------------------------------------- 1 | INCLUDES= ..\inc\nmeap.h ..\inc\nmeap_def.h 2 | CSRC = nmeap01.c 3 | LIBNAME = ..\lib\libnmeap.lib 4 | 5 | # build everything 6 | all : test1.exe test2.exe test3.exe wingps.exe 7 | 8 | test1.exe : test1.c $(LIBNAME) 9 | cl /DNDEBUG /c /I..\inc test1.c 10 | link /OUT:test1.exe test1.obj $(LIBNAME) 11 | 12 | test2.exe : test2.c $(LIBNAME) 13 | cl /DNDEBUG /c /I..\inc test2.c 14 | link /OUT:test2.exe test2.obj $(LIBNAME) 15 | 16 | test3.exe : test3.c $(LIBNAME) 17 | cl /DNDEBUG /c /I..\inc test3.c 18 | link /OUT:test3.exe test3.obj $(LIBNAME) 19 | 20 | wingps.exe : wingps.c $(LIBNAME) 21 | cl /DNDEBUG /c /I..\inc wingps.c 22 | link /OUT:wingps.exe wingps.obj $(LIBNAME) 23 | 24 | # erase all intermediate and output files 25 | clean : 26 | -erase *.obj 27 | -erase *.exe 28 | 29 | 30 | -------------------------------------------------------------------------------- /bertos/net/nmeap/win32.mak: -------------------------------------------------------------------------------- 1 | # directories 2 | SRC=src 3 | TST=tst 4 | 5 | all : 6 | cd $(SRC) 7 | $(MAKE) -f nmeap.mak all 8 | cd ..\$(TST) 9 | $(MAKE) -f tst.mak all 10 | cd .. 11 | 12 | 13 | clean : 14 | cd $(SRC) 15 | $(MAKE) -f nmeap.mak clean 16 | cd ..\$(TST) 17 | $(MAKE) -f tst.mak clean 18 | cd .. 19 | 20 | doc : 21 | doxygen 22 | 23 | -------------------------------------------------------------------------------- /bertos/remote_merge: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #set -x 3 | 4 | if [ $# -lt 2 ] ; then 5 | printf "\nMerge remote url commits into local BeRTOS svn repository.\n" 6 | printf "Usage: $0 []\n" 7 | printf "If remote end revision is not supplied HEAD will be used.\n" 8 | exit 1 9 | fi 10 | 11 | 12 | MERGE_URL="$1" 13 | START_REV="$2" 14 | if [ z"$3" = z ] ; then 15 | END_REV=HEAD 16 | else 17 | END_REV="$3" 18 | fi 19 | 20 | #Check for local uncommitted modifications 21 | STATUS=`svn status -q` 22 | if [[ z"$STATUS" != z && "${STATUS:0:1}" != $'\n' ]] ; then 23 | printf "Project has local modifications, it must be clean\n" 24 | exit 1 25 | fi 26 | 27 | #Get list of revisions to merge. 28 | REV_LIST=`svn log $MERGE_URL -r$START_REV:$END_REV --quiet 2>&1| perl -ne 'if(m/^r([0-9]+)/) {print $1, "\n";}'` 29 | 30 | printf "Merged from external project:\n" > header 31 | for rev in $REV_LIST 32 | do 33 | #Get commit log message only 34 | #svn pg --revprop -r$rev svn:log $MERGE_URL > tmp_msg 35 | 36 | #Get revision commit log with date and author 37 | svn log -r$rev $MERGE_URL > tmp_msg 38 | #Replace leading and trailing banners "---------------------..." 39 | sed -i 's/^-\+/\*\*\*\*\*\*\*\*\*\*/' tmp_msg 40 | #Indent all message 41 | sed -i 's/\(^.*\)/\t\1/' tmp_msg 42 | cat header tmp_msg > commit_msg 43 | #Try to merge ... 44 | svn merge $MERGE_URL -c$rev || exit 1 45 | #and commit! 46 | svn ci -Fcommit_msg 47 | done 48 | rm -rf header tmp_msg commit_msg 49 | -------------------------------------------------------------------------------- /buildrev.h: -------------------------------------------------------------------------------- 1 | #define VERS_BUILD 432 2 | #define VERS_HOST "demopc" 3 | -------------------------------------------------------------------------------- /discovery_aprs.workspace: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /discovery_aprs/.spec: -------------------------------------------------------------------------------- 1 | name = 'empty preset' 2 | advanced = True 3 | description=""" 4 |

5 | This is a minimalist project, it just initializes the hardware of the 6 | supported board and proposes an empty main. 7 | <\p> 8 | """ 9 | -------------------------------------------------------------------------------- /discovery_aprs/ad.h: -------------------------------------------------------------------------------- 1 | #ifndef AD_H_ 2 | #define AD_H_ 3 | 4 | #include 5 | 6 | void AD_Init(Afsk *); 7 | void AD_Start(void); 8 | void AD_Stop(void); 9 | void AD_SetTimer(uint16_t, uint16_t); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /discovery_aprs/cfg/cfg_heap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for heap module. 34 | * 35 | * 36 | * \author Daniele Basile 37 | */ 38 | 39 | #ifndef CFG_HEAP_H 40 | #define CFG_HEAP_H 41 | 42 | /** 43 | * Enable malloc/free like API. 44 | * $WIZ$ type = "boolean" 45 | */ 46 | #define CONFIG_HEAP_MALLOC 1 47 | 48 | #endif /* CFG_HEAP_H */ 49 | 50 | 51 | -------------------------------------------------------------------------------- /discovery_aprs/cfg/cfg_ini_reader.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for ini reader module. 34 | * 35 | * 36 | * \author Luca Ottaviano 37 | */ 38 | 39 | #ifndef CFG_INI_READER_H 40 | #define CFG_INI_READER_H 41 | 42 | /** 43 | * Maximum ini file line length (chars). 44 | * $WIZ$ type = "int"; min = 1 45 | */ 46 | #define CONFIG_INI_MAX_LINE_LEN 64 47 | 48 | #endif /* CFG_INI_READER_H */ 49 | -------------------------------------------------------------------------------- /discovery_aprs/cfg/cfg_kiss.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CFG_KISS_H 3 | #define CFG_KISS_H 4 | 5 | /** 6 | * Module logging level. 7 | * 8 | * $WIZ$ type = "enum" 9 | * $WIZ$ value_list = "log_level" 10 | */ 11 | #define KISS_LOG_LEVEL LOG_LVL_ERR 12 | 13 | /** 14 | * Module logging format. 15 | * 16 | * $WIZ$ type = "enum" 17 | * $WIZ$ value_list = "log_format" 18 | */ 19 | #define KISS_LOG_FORMAT LOG_FMT_TERSE 20 | 21 | #endif /* CFG_KISS_H */ 22 | -------------------------------------------------------------------------------- /discovery_aprs/cfg/cfg_monitor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Kernel monitor configuration parameters 34 | * 35 | * \author Bernie Innocenti 36 | */ 37 | 38 | #ifndef CFG_MONITOR_H 39 | #define CFG_MONITOR_H 40 | 41 | /** 42 | * Process monitor. 43 | * $WIZ$ type = "autoenabled" 44 | */ 45 | #define CONFIG_KERN_MONITOR 0 46 | 47 | #endif /* CFG_MONITOR_H */ 48 | -------------------------------------------------------------------------------- /discovery_aprs/cfg/cfg_signal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Kernel signals configuration parameters 34 | * 35 | * \author Bernie Innocenti 36 | */ 37 | 38 | #ifndef CFG_SIGNAL_H 39 | #define CFG_SIGNAL_H 40 | 41 | /** 42 | * Inter-process signals. 43 | * $WIZ$ type = "autoenabled" 44 | */ 45 | #define CONFIG_KERN_SIGNALS 0 46 | 47 | #endif /* CFG_SIGNAL_H */ 48 | -------------------------------------------------------------------------------- /discovery_aprs/cfg/cfg_tftp.h: -------------------------------------------------------------------------------- 1 | #ifndef CFG_TFTP_H 2 | #define CFG_TFTP_H 3 | 4 | /** 5 | * Module logging level. 6 | * 7 | * $WIZ$ type = "enum" 8 | * $WIZ$ value_list = "log_level" 9 | */ 10 | #define TFTP_LOG_LEVEL LOG_LVL_WARN 11 | 12 | /** 13 | * Module logging format. 14 | * 15 | * $WIZ$ type = "enum" 16 | * $WIZ$ value_list = "log_format" 17 | */ 18 | #define TFTP_LOG_FORMAT LOG_FMT_VERBOSE 19 | 20 | #endif /* CFG_TFTP_H */ 21 | -------------------------------------------------------------------------------- /discovery_aprs/cfg/cfg_wdt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for watchdog module. 34 | * 35 | * 36 | * \author Daniele Basile 37 | */ 38 | 39 | #ifndef CFG_WDT_H 40 | #define CFG_WDT_H 41 | 42 | /// Enable watchdog timer. $WIZ$ type = "autoenabled" 43 | #define CONFIG_WATCHDOG 0 44 | 45 | #endif /* CFG_WDT_H */ 46 | 47 | 48 | -------------------------------------------------------------------------------- /discovery_aprs/da.h: -------------------------------------------------------------------------------- 1 | #ifndef DA_H_ 2 | #define DA_H_ 3 | 4 | #include 5 | 6 | void DA_Init(Afsk *afsk); 7 | void DA_SetTimer(uint16_t prescaler, uint16_t period); 8 | void DA_Start(void); 9 | void DA_Stop(void); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /discovery_aprs/discovery_aprs_user.mk: -------------------------------------------------------------------------------- 1 | # 2 | # User makefile. 3 | # Edit this file to change compiler options and related stuff. 4 | # 5 | 6 | # Programmer interface configuration, see http://dev.bertos.org/wiki/ProgrammerInterface for help 7 | discovery_aprs_PROGRAMMER_TYPE = none 8 | discovery_aprs_PROGRAMMER_PORT = none 9 | 10 | # Files included by the user. 11 | discovery_aprs_USER_CSRC = \ 12 | $(discovery_aprs_SRC_PATH)/main.c \ 13 | $(discovery_aprs_SRC_PATH)/ad.c \ 14 | $(discovery_aprs_SRC_PATH)/da.c \ 15 | $(discovery_aprs_SRC_PATH)/stm32f10x_adc.c \ 16 | $(discovery_aprs_SRC_PATH)/stm32f10x_dac.c \ 17 | $(discovery_aprs_SRC_PATH)/stm32f10x_tim.c \ 18 | # 19 | 20 | # Files included by the user. 21 | discovery_aprs_USER_PCSRC = \ 22 | # 23 | 24 | # Files included by the user. 25 | discovery_aprs_USER_CPPASRC = \ 26 | # 27 | 28 | # Files included by the user. 29 | discovery_aprs_USER_CXXSRC = \ 30 | # 31 | 32 | # Files included by the user. 33 | discovery_aprs_USER_ASRC = \ 34 | # 35 | 36 | # Flags included by the user. 37 | discovery_aprs_USER_LDFLAGS = \ 38 | # 39 | 40 | # Flags included by the user. 41 | discovery_aprs_USER_CPPAFLAGS = \ 42 | # 43 | 44 | # Flags included by the user. 45 | discovery_aprs_USER_CPPFLAGS = \ 46 | -fno-strict-aliasing \ 47 | -mfix-cortex-m3-ldrd \ 48 | -fwrapv \ 49 | -DSTM32F10X_MD_VL \ 50 | -Wno-strict-prototypes \ 51 | # 52 | -------------------------------------------------------------------------------- /discovery_aprs/hw/hw_afsk.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief AFSK modem hardware-specific definitions. 34 | * 35 | * 36 | * \author Francesco Sacchi 37 | */ 38 | 39 | 40 | #include "hw_afsk.h" 41 | 42 | -------------------------------------------------------------------------------- /discovery_aprs/hw/hw_buzzerled.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Buzzerled hardware-specific definitions 34 | * 35 | * 36 | * \author Daniele Basile 37 | */ 38 | 39 | 40 | #ifndef HW_BUZZERLED_H 41 | #define HW_BUZZERLED_H 42 | 43 | #warning TODO:This is an example implementation, you must implement it! 44 | 45 | 46 | #endif /* HW_BUZZERLED_H */ 47 | -------------------------------------------------------------------------------- /discovery_aprs/hw/hw_dataflash.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Dataflash HW control routines (interface). 34 | * 35 | * \author Francesco Sacchi 36 | */ 37 | 38 | #ifndef HW_DATAFLASH_H 39 | #define HW_DATAFLASH_H 40 | 41 | #include 42 | 43 | void dataflash_hw_init(void); 44 | void dataflash_hw_setCS(bool enable); 45 | void dataflash_hw_setReset(bool enable); 46 | 47 | #endif /* HW_DATAFLASH_H */ 48 | -------------------------------------------------------------------------------- /discovery_aprs/hw/hw_eth.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief MAC address definition 34 | * 35 | * \author Luca Ottaviano 36 | */ 37 | 38 | #include "hw/hw_eth.h" 39 | 40 | uint8_t mac_addr[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }; 41 | -------------------------------------------------------------------------------- /discovery_aprs/hw/hw_eth.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief MAC address definition 34 | * 35 | * \author Luca Ottaviano 36 | */ 37 | #ifndef HW_ETH_H 38 | #define HW_ETH_H 39 | 40 | #include 41 | 42 | extern uint8_t mac_addr[6]; 43 | 44 | #endif // HW_ETH_H 45 | -------------------------------------------------------------------------------- /discovery_aprs/hw/hw_input.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 33 | * 34 | * \brief Macro for HW_INPUT_H 35 | * 36 | * \author Andrea Grandi 37 | */ 38 | 39 | #ifndef HW_INPUT_H 40 | #define HW_INPUT_H 41 | 42 | #warning FIXME: This is an example implementation, you must implement it 43 | 44 | #define INPUT_INIT() do { /* implement me */} while(0) 45 | 46 | #endif /* HW_INPUT_H */ 47 | -------------------------------------------------------------------------------- /discovery_aprs/hw/hw_lm75.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Hardware macro definition. 34 | * 35 | * \author Daniele Basile 36 | */ 37 | 38 | #ifndef HW_LM75_H 39 | #define HW_LM75_H 40 | 41 | #warning TODO:This is an example implentation, you must implement it! 42 | 43 | #define LM75_HW_INIT() \ 44 | do { \ 45 | /* Pin init */\ 46 | } while (0) 47 | 48 | #endif /* HW_LM75_H */ 49 | 50 | -------------------------------------------------------------------------------- /discovery_aprs/hw/hw_ntc.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief NTC hardware-specific definition 34 | * 35 | * \author Lorenzo Berni 36 | * 37 | */ 38 | 39 | #include 40 | #include "hw/ntc_map.h" 41 | 42 | const res_t NTC_RSER[NTC_CNT]; 43 | const res_t NTC_RPAR[NTC_CNT]; 44 | const amp_t NTC_AMP[NTC_CNT]; 45 | const NtcHwInfo* NTC_INFO[NTC_CNT]; 46 | -------------------------------------------------------------------------------- /discovery_aprs/hw/hw_phase.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Phase control hardware-specific definitions 34 | * 35 | * \author Francesco Sacchi 36 | */ 37 | 38 | #ifndef HW_PHASE_H 39 | #define HW_PHASE_H 40 | 41 | #include "hw/hw_phase.h" 42 | 43 | #warning TODO:This is an example implementation, you must implement it! 44 | 45 | #endif /* HW_PHASE_H */ 46 | -------------------------------------------------------------------------------- /discovery_aprs/stm32f10x.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robots/APRS/f281a283bffac9a7e002024898d91431337c6bda/discovery_aprs/stm32f10x.h -------------------------------------------------------------------------------- /images/discovery_aprs.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robots/APRS/f281a283bffac9a7e002024898d91431337c6bda/images/discovery_aprs.bin -------------------------------------------------------------------------------- /images/discovery_aprs.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robots/APRS/f281a283bffac9a7e002024898d91431337c6bda/images/discovery_aprs.elf -------------------------------------------------------------------------------- /openocd.cfg: -------------------------------------------------------------------------------- 1 | 2 | 3 | interface vsllink 4 | transport select swd 5 | swd_mode 2 6 | swd_delay 2 7 | 8 | #interface ft2232 9 | #ft2232_device_desc "RoBoT_MFG Bus Blaster v2" 10 | #ft2232_layout jtagkey 11 | #ft2232_vid_pid 0x0403 0x6010 12 | 13 | 14 | set WORKAREASIZE 0x2000 15 | 16 | source [find target/stm32.cfg] 17 | 18 | proc flash_load { } { 19 | reset halt 20 | flash write_image erase images/discovery_aprs.elf 21 | #flash write_image erase images/tracker.elf 22 | } 23 | -------------------------------------------------------------------------------- /project.bertos: -------------------------------------------------------------------------------- 1 | (dp0 2 | S'BERTOS_PATH' 3 | p1 4 | S'.' 5 | p2 6 | sS'SELECTED_FREQ' 7 | p3 8 | V24000000 9 | p4 10 | sS'WIZARD_VERSION' 11 | p5 12 | I4 13 | sS'PROJECT_NAME' 14 | p6 15 | Vdiscovery_aprs 16 | p7 17 | sS'TOOLCHAIN' 18 | p8 19 | (dp9 20 | S'path' 21 | p10 22 | V/usr/local/cross-arm/bin/arm-none-eabi-gcc 23 | p11 24 | ssS'PROJECT_HW_PATH_FROM_MAKEFILE' 25 | p12 26 | g7 27 | sS'ENABLED_MODULES' 28 | p13 29 | (lp14 30 | S'afsk' 31 | p15 32 | aS'ax25' 33 | p16 34 | aS'crc-ccitt' 35 | p17 36 | aS'debug' 37 | p18 38 | aS'formatwr' 39 | p19 40 | aS'heap' 41 | p20 42 | aS'kfile' 43 | p21 44 | aS'ser' 45 | p22 46 | aS'timer' 47 | p23 48 | asS'CPU_NAME' 49 | p24 50 | VSTM32F100RB 51 | p25 52 | sS'PROJECT_HW_PATH' 53 | p26 54 | Vdiscovery_aprs 55 | p27 56 | sS'PROJECT_SRC_PATH' 57 | p28 58 | Vdiscovery_aprs 59 | p29 60 | sS'PRESET' 61 | p30 62 | NsS'PROJECT_SRC_PATH_FROM_MAKEFILE' 63 | p31 64 | g7 65 | sS'OUTPUT' 66 | p32 67 | (lp33 68 | S'codelite' 69 | p34 70 | as. -------------------------------------------------------------------------------- /tracker/.spec: -------------------------------------------------------------------------------- 1 | name = 'empty preset' 2 | advanced = True 3 | description=""" 4 |

5 | This is a minimalist project, it just initializes the hardware of the 6 | supported board and proposes an empty main. 7 | <\p> 8 | """ 9 | -------------------------------------------------------------------------------- /tracker/ad.h: -------------------------------------------------------------------------------- 1 | #ifndef AD_H_ 2 | #define AD_H_ 3 | 4 | #include 5 | 6 | void AD_Init(Afsk *); 7 | void AD_Start(void); 8 | void AD_Stop(void); 9 | void AD_SetTimer(uint16_t, uint16_t); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /tracker/b91.h: -------------------------------------------------------------------------------- 1 | #ifndef B91_h 2 | #define B91_h 3 | 4 | #include 5 | 6 | void b91_encode(uint8_t *buf, uint32_t in); 7 | void b91_encode_lat(uint8_t *buf, uint32_t lat, uint8_t lat_h); 8 | void b91_encode_lon(uint8_t *buf, uint32_t lon, uint8_t lon_h); 9 | void b91_encode_course(uint8_t *buf, uint16_t course); 10 | void b91_encode_speed(uint8_t *buf, uint16_t speed); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /tracker/cfg/cfg_heap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for heap module. 34 | * 35 | * 36 | * \author Daniele Basile 37 | */ 38 | 39 | #ifndef CFG_HEAP_H 40 | #define CFG_HEAP_H 41 | 42 | /** 43 | * Enable malloc/free like API. 44 | * $WIZ$ type = "boolean" 45 | */ 46 | #define CONFIG_HEAP_MALLOC 1 47 | 48 | #endif /* CFG_HEAP_H */ 49 | 50 | 51 | -------------------------------------------------------------------------------- /tracker/cfg/cfg_ini_reader.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for ini reader module. 34 | * 35 | * 36 | * \author Luca Ottaviano 37 | */ 38 | 39 | #ifndef CFG_INI_READER_H 40 | #define CFG_INI_READER_H 41 | 42 | /** 43 | * Maximum ini file line length (chars). 44 | * $WIZ$ type = "int"; min = 1 45 | */ 46 | #define CONFIG_INI_MAX_LINE_LEN 64 47 | 48 | #endif /* CFG_INI_READER_H */ 49 | -------------------------------------------------------------------------------- /tracker/cfg/cfg_kiss.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CFG_KISS_H 3 | #define CFG_KISS_H 4 | 5 | /** 6 | * Module logging level. 7 | * 8 | * $WIZ$ type = "enum" 9 | * $WIZ$ value_list = "log_level" 10 | */ 11 | #define KISS_LOG_LEVEL LOG_LVL_ERR 12 | 13 | /** 14 | * Module logging format. 15 | * 16 | * $WIZ$ type = "enum" 17 | * $WIZ$ value_list = "log_format" 18 | */ 19 | #define KISS_LOG_FORMAT LOG_FMT_TERSE 20 | 21 | #endif /* CFG_KISS_H */ 22 | -------------------------------------------------------------------------------- /tracker/cfg/cfg_monitor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Kernel monitor configuration parameters 34 | * 35 | * \author Bernie Innocenti 36 | */ 37 | 38 | #ifndef CFG_MONITOR_H 39 | #define CFG_MONITOR_H 40 | 41 | /** 42 | * Process monitor. 43 | * $WIZ$ type = "autoenabled" 44 | */ 45 | #define CONFIG_KERN_MONITOR 0 46 | 47 | #endif /* CFG_MONITOR_H */ 48 | -------------------------------------------------------------------------------- /tracker/cfg/cfg_signal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Kernel signals configuration parameters 34 | * 35 | * \author Bernie Innocenti 36 | */ 37 | 38 | #ifndef CFG_SIGNAL_H 39 | #define CFG_SIGNAL_H 40 | 41 | /** 42 | * Inter-process signals. 43 | * $WIZ$ type = "autoenabled" 44 | */ 45 | #define CONFIG_KERN_SIGNALS 0 46 | 47 | #endif /* CFG_SIGNAL_H */ 48 | -------------------------------------------------------------------------------- /tracker/cfg/cfg_tas5706a.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for the TAS5706A module. 34 | * 35 | * \author Luca Ottaviano 36 | */ 37 | 38 | #ifndef CFG_TAS5706A_H 39 | #define CFG_TAS5706A_H 40 | 41 | /** 42 | * Maximum output volume for TAS chip [dB]. 43 | * 44 | * $WIZ$ type = "int" 45 | * $WIZ$ min = -100 46 | * $WIZ$ max = 24 47 | */ 48 | #define CONFIG_TAS_MAX_VOL -39 49 | 50 | #endif /* CFG_TAS5706A_H */ 51 | -------------------------------------------------------------------------------- /tracker/cfg/cfg_tftp.h: -------------------------------------------------------------------------------- 1 | #ifndef CFG_TFTP_H 2 | #define CFG_TFTP_H 3 | 4 | /** 5 | * Module logging level. 6 | * 7 | * $WIZ$ type = "enum" 8 | * $WIZ$ value_list = "log_level" 9 | */ 10 | #define TFTP_LOG_LEVEL LOG_LVL_WARN 11 | 12 | /** 13 | * Module logging format. 14 | * 15 | * $WIZ$ type = "enum" 16 | * $WIZ$ value_list = "log_format" 17 | */ 18 | #define TFTP_LOG_FORMAT LOG_FMT_VERBOSE 19 | 20 | #endif /* CFG_TFTP_H */ 21 | -------------------------------------------------------------------------------- /tracker/cfg/cfg_wdt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Configuration file for watchdog module. 34 | * 35 | * 36 | * \author Daniele Basile 37 | */ 38 | 39 | #ifndef CFG_WDT_H 40 | #define CFG_WDT_H 41 | 42 | /// Enable watchdog timer. $WIZ$ type = "autoenabled" 43 | #define CONFIG_WATCHDOG 0 44 | 45 | #endif /* CFG_WDT_H */ 46 | 47 | 48 | -------------------------------------------------------------------------------- /tracker/da.h: -------------------------------------------------------------------------------- 1 | #ifndef DA_H_ 2 | #define DA_H_ 3 | 4 | #include 5 | 6 | void DA_Init(Afsk *afsk); 7 | void DA_SetTimer(uint16_t prescaler, uint16_t period); 8 | void DA_Start(void); 9 | void DA_Stop(void); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /tracker/hw/hw_afsk.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief AFSK modem hardware-specific definitions. 34 | * 35 | * 36 | * \author Francesco Sacchi 37 | */ 38 | 39 | 40 | #include "hw_afsk.h" 41 | 42 | -------------------------------------------------------------------------------- /tracker/hw/hw_buzzerled.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Buzzerled hardware-specific definitions 34 | * 35 | * 36 | * \author Daniele Basile 37 | */ 38 | 39 | 40 | #ifndef HW_BUZZERLED_H 41 | #define HW_BUZZERLED_H 42 | 43 | #warning TODO:This is an example implementation, you must implement it! 44 | 45 | 46 | #endif /* HW_BUZZERLED_H */ 47 | -------------------------------------------------------------------------------- /tracker/hw/hw_dataflash.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Dataflash HW control routines (interface). 34 | * 35 | * \author Francesco Sacchi 36 | */ 37 | 38 | #ifndef HW_DATAFLASH_H 39 | #define HW_DATAFLASH_H 40 | 41 | #include 42 | 43 | void dataflash_hw_init(void); 44 | void dataflash_hw_setCS(bool enable); 45 | void dataflash_hw_setReset(bool enable); 46 | 47 | #endif /* HW_DATAFLASH_H */ 48 | -------------------------------------------------------------------------------- /tracker/hw/hw_eth.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief MAC address definition 34 | * 35 | * \author Luca Ottaviano 36 | */ 37 | 38 | #include "hw/hw_eth.h" 39 | 40 | uint8_t mac_addr[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }; 41 | -------------------------------------------------------------------------------- /tracker/hw/hw_eth.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief MAC address definition 34 | * 35 | * \author Luca Ottaviano 36 | */ 37 | #ifndef HW_ETH_H 38 | #define HW_ETH_H 39 | 40 | #include 41 | 42 | extern uint8_t mac_addr[6]; 43 | 44 | #endif // HW_ETH_H 45 | -------------------------------------------------------------------------------- /tracker/hw/hw_input.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 33 | * 34 | * \brief Macro for HW_INPUT_H 35 | * 36 | * \author Andrea Grandi 37 | */ 38 | 39 | #ifndef HW_INPUT_H 40 | #define HW_INPUT_H 41 | 42 | #warning FIXME: This is an example implementation, you must implement it 43 | 44 | #define INPUT_INIT() do { /* implement me */} while(0) 45 | 46 | #endif /* HW_INPUT_H */ 47 | -------------------------------------------------------------------------------- /tracker/hw/hw_lm75.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Hardware macro definition. 34 | * 35 | * \author Daniele Basile 36 | */ 37 | 38 | #ifndef HW_LM75_H 39 | #define HW_LM75_H 40 | 41 | #warning TODO:This is an example implentation, you must implement it! 42 | 43 | #define LM75_HW_INIT() \ 44 | do { \ 45 | /* Pin init */\ 46 | } while (0) 47 | 48 | #endif /* HW_LM75_H */ 49 | 50 | -------------------------------------------------------------------------------- /tracker/hw/hw_ntc.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief NTC hardware-specific definition 34 | * 35 | * \author Lorenzo Berni 36 | * 37 | */ 38 | 39 | #include 40 | #include "hw/ntc_map.h" 41 | 42 | const res_t NTC_RSER[NTC_CNT]; 43 | const res_t NTC_RPAR[NTC_CNT]; 44 | const amp_t NTC_AMP[NTC_CNT]; 45 | const NtcHwInfo* NTC_INFO[NTC_CNT]; 46 | -------------------------------------------------------------------------------- /tracker/hw/hw_phase.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 32 | * 33 | * \brief Phase control hardware-specific definitions 34 | * 35 | * \author Francesco Sacchi 36 | */ 37 | 38 | #ifndef HW_PHASE_H 39 | #define HW_PHASE_H 40 | 41 | #include "hw/hw_phase.h" 42 | 43 | #warning TODO:This is an example implementation, you must implement it! 44 | 45 | #endif /* HW_PHASE_H */ 46 | -------------------------------------------------------------------------------- /tracker/nmea.h: -------------------------------------------------------------------------------- 1 | #ifndef NMEA_h_ 2 | #define NMEA_h_ 3 | 4 | #include 5 | #include 6 | 7 | typedef void (*nmea_parser_t)(uint8_t *, uint8_t); 8 | 9 | struct gpsdata_t { 10 | // time 11 | uint8_t hour; 12 | uint8_t min; 13 | uint8_t sec; 14 | 15 | // date 16 | uint8_t day; 17 | uint8_t month; 18 | uint8_t year; 19 | 20 | // position 21 | uint8_t valid; 22 | uint32_t lat; 23 | uint8_t lat_h; 24 | 25 | uint32_t lon; 26 | uint8_t lon_h; 27 | 28 | uint16_t alt; 29 | 30 | uint16_t heading; 31 | uint16_t speed; 32 | 33 | uint8_t sats; 34 | uint8_t hdop; 35 | 36 | uint8_t updated; 37 | }; 38 | 39 | 40 | void nmea_init(nmea_parser_t parser); 41 | void nmea_poll(KFile *channel); 42 | void nmea_parse(uint8_t *buf, uint8_t len); 43 | 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /tracker/sb.h: -------------------------------------------------------------------------------- 1 | #ifndef SB_h_ 2 | #define SB_h_ 3 | 4 | struct sb_config { 5 | bool enabled; 6 | 7 | uint16_t high_speed; 8 | ticks_t high_rate; 9 | 10 | uint16_t low_speed; 11 | ticks_t low_rate; 12 | 13 | ticks_t min_turn_time; 14 | uint16_t min_turn_angle; 15 | uint16_t turn_slope; 16 | }; 17 | 18 | /* interval in seconds */ 19 | extern uint16_t sb_rate; 20 | 21 | void sb_init(void); 22 | void sb_calculate(uint16_t speed, uint16_t course, bool *beacon_now); 23 | bool sb_send(bool beacon_now); 24 | 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /tracker/stm32f10x.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robots/APRS/f281a283bffac9a7e002024898d91431337c6bda/tracker/stm32f10x.h -------------------------------------------------------------------------------- /tracker/tracker_user.mk: -------------------------------------------------------------------------------- 1 | # 2 | # User makefile. 3 | # Edit this file to change compiler options and related stuff. 4 | # 5 | 6 | # Programmer interface configuration, see http://dev.bertos.org/wiki/ProgrammerInterface for help 7 | tracker_PROGRAMMER_TYPE = none 8 | tracker_PROGRAMMER_PORT = none 9 | 10 | # Files included by the user. 11 | tracker_USER_CSRC = \ 12 | $(tracker_SRC_PATH)/main.c \ 13 | $(tracker_SRC_PATH)/ad.c \ 14 | $(tracker_SRC_PATH)/da.c \ 15 | $(tracker_SRC_PATH)/stm32f10x_adc.c \ 16 | $(tracker_SRC_PATH)/stm32f10x_tim.c \ 17 | $(tracker_SRC_PATH)/nmea.c \ 18 | $(tracker_SRC_PATH)/sb.c \ 19 | #$(tracker_SRC_PATH)/b91.c \ 20 | # 21 | 22 | # Files included by the user. 23 | tracker_USER_PCSRC = \ 24 | # 25 | 26 | # Files included by the user. 27 | tracker_USER_CPPASRC = \ 28 | # 29 | 30 | # Files included by the user. 31 | tracker_USER_CXXSRC = \ 32 | # 33 | 34 | # Files included by the user. 35 | tracker_USER_ASRC = \ 36 | # 37 | 38 | # Flags included by the user. 39 | tracker_USER_LDFLAGS = \ 40 | # 41 | 42 | # Flags included by the user. 43 | tracker_USER_CPPAFLAGS = \ 44 | # 45 | 46 | # Flags included by the user. 47 | tracker_USER_CPPFLAGS = \ 48 | -fno-strict-aliasing \ 49 | -mfix-cortex-m3-ldrd \ 50 | -fwrapv \ 51 | -DSTM32F10X_MD_VL \ 52 | -Wno-strict-prototypes \ 53 | # 54 | --------------------------------------------------------------------------------