├── .gitignore ├── README.TROOPERS16 ├── README.md ├── contiki ├── CONTRIBUTING.md ├── LICENSE ├── Makefile.include ├── README-BUILDING.md ├── README-EXAMPLES.md ├── README.md ├── contiki-doc │ ├── Doxyfile │ ├── Makefile │ ├── apps.txt │ ├── build-system.txt │ ├── code-style.c │ ├── code-style.txt │ ├── contiki-mainpage.txt │ ├── cpu.txt │ ├── dev.txt │ ├── example-list.c │ ├── example-pollhandler.c │ ├── example-program.c │ ├── example-psock-client.c │ ├── example-psock-server.c │ ├── examples.txt │ ├── lib.txt │ ├── mem.txt │ ├── net.txt │ ├── pics │ │ ├── caution.gif │ │ ├── contiki_menu_3290.jpg │ │ ├── dataframe.png │ │ ├── fcf.jpg │ │ ├── layers.png │ │ ├── raven.jpg │ │ ├── raven.png │ │ ├── raven3290p.jpg │ │ ├── raven_detail.jpg │ │ ├── ravenusb_large.jpg │ │ ├── ravenusb_medium.jpg │ │ ├── ravenusb_network_connections.png │ │ ├── ravenusb_shortpins.jpg │ │ ├── tutorial-raven-basic.jpg │ │ ├── tutorial-raven-connections.jpg │ │ ├── tutorial-raven-jtag.jpg │ │ ├── wireshark_color.png │ │ └── wireshark_explained.png │ ├── platform.txt │ ├── pt-doc.txt │ ├── ravenusbstick-docs.txt │ ├── rime-doc.txt │ ├── sicslowmac-doc.txt │ ├── sicslowpan-doc.txt │ ├── sys.txt │ ├── tutorial-raven.txt │ ├── tutorials.txt │ ├── uip-doc.txt │ └── uip6-doc.txt ├── core │ ├── cfs │ │ ├── cfs-coffee.c │ │ ├── cfs-coffee.h │ │ ├── cfs-eeprom.c │ │ ├── cfs-posix-dir.c │ │ ├── cfs-posix.c │ │ ├── cfs-ram.c │ │ ├── cfs-xmem.c │ │ └── cfs.h │ ├── contiki-default-conf.h │ ├── contiki-lib.h │ ├── contiki-net.h │ ├── contiki-version.h │ ├── contiki.h │ ├── ctk │ │ ├── ctk-conio.c │ │ ├── ctk-conio.h │ │ ├── ctk-draw.h │ │ ├── ctk-filedialog.c │ │ ├── ctk-filedialog.h │ │ ├── ctk-mouse.h │ │ ├── ctk-textentry-checkbox.c │ │ ├── ctk-textentry-checkbox.h │ │ ├── ctk-textentry-cmdline.c │ │ ├── ctk-textentry-cmdline.h │ │ ├── ctk-textentry-multiline.c │ │ ├── ctk-textentry-multiline.h │ │ ├── ctk.c │ │ ├── ctk.h │ │ └── libconio │ │ │ ├── libconio.c │ │ │ └── libconio.h │ ├── dev │ │ ├── battery-sensor.h │ │ ├── button-sensor.h │ │ ├── eeprom.h │ │ ├── leds.c │ │ ├── leds.h │ │ ├── nullradio.c │ │ ├── nullradio.h │ │ ├── radio-sensor.h │ │ ├── radio.h │ │ ├── rom.h │ │ ├── serial-line.c │ │ ├── serial-line.h │ │ ├── slip.c │ │ ├── slip.h │ │ ├── spi.h │ │ ├── watchdog.h │ │ └── xmem.h │ ├── lib │ │ ├── aes-128.c │ │ ├── aes-128.h │ │ ├── assert.c │ │ ├── assert.h │ │ ├── ccm-star.c │ │ ├── ccm-star.h │ │ ├── crc16.c │ │ ├── crc16.h │ │ ├── gcr.c │ │ ├── gcr.h │ │ ├── ifft.c │ │ ├── ifft.h │ │ ├── list.c │ │ ├── list.h │ │ ├── me.c │ │ ├── me.h │ │ ├── me_tabs.c │ │ ├── me_tabs.h │ │ ├── memb.c │ │ ├── memb.h │ │ ├── mmem.c │ │ ├── mmem.h │ │ ├── petsciiconv.c │ │ ├── petsciiconv.h │ │ ├── print-stats.c │ │ ├── print-stats.h │ │ ├── random.c │ │ ├── random.h │ │ ├── ringbuf.c │ │ ├── ringbuf.h │ │ ├── ringbufindex.c │ │ ├── ringbufindex.h │ │ ├── sensors.c │ │ ├── sensors.h │ │ ├── settings.c │ │ ├── settings.h │ │ ├── strncasecmp │ │ │ └── strncasecmp.c │ │ ├── trickle-timer.c │ │ └── trickle-timer.h │ ├── loader │ │ ├── cle.c │ │ ├── cle.h │ │ ├── cle_avr.c │ │ ├── cle_msp430.c │ │ ├── cmod.c │ │ ├── cmod.h │ │ ├── dlloader.c │ │ ├── dlloader.h │ │ ├── elf32.h │ │ ├── elfloader-arch.h │ │ ├── elfloader-avr.c │ │ ├── elfloader-msp430.c │ │ ├── elfloader-msp430x.c │ │ ├── elfloader-stub.c │ │ ├── elfloader-x86.c │ │ ├── elfloader.c │ │ ├── elfloader.h │ │ ├── elfloader_compat.c │ │ ├── elfloader_compat.h │ │ ├── sym.c │ │ ├── sym.h │ │ ├── symbols-def.h │ │ ├── symbols.h │ │ ├── symtab-avr.c │ │ ├── symtab.c │ │ └── symtab.h │ ├── net │ │ ├── http-socket │ │ │ ├── http-socket.c │ │ │ └── http-socket.h │ │ ├── ip │ │ │ ├── dhcpc.c │ │ │ ├── dhcpc.h │ │ │ ├── ip64-addr.c │ │ │ ├── ip64-addr.h │ │ │ ├── psock.c │ │ │ ├── psock.h │ │ │ ├── resolv.c │ │ │ ├── resolv.h │ │ │ ├── simple-udp.c │ │ │ ├── simple-udp.h │ │ │ ├── slipdev.c │ │ │ ├── slipdev.h │ │ │ ├── tcp-socket.c │ │ │ ├── tcp-socket.h │ │ │ ├── tcpip.c │ │ │ ├── tcpip.h │ │ │ ├── udp-socket.c │ │ │ ├── udp-socket.h │ │ │ ├── uip-debug.c │ │ │ ├── uip-debug.h │ │ │ ├── uip-nameserver.c │ │ │ ├── uip-nameserver.h │ │ │ ├── uip-packetqueue.c │ │ │ ├── uip-packetqueue.h │ │ │ ├── uip-split.c │ │ │ ├── uip-split.h │ │ │ ├── uip-udp-packet.c │ │ │ ├── uip-udp-packet.h │ │ │ ├── uip.h │ │ │ ├── uip_arch.h │ │ │ ├── uiplib.c │ │ │ ├── uiplib.h │ │ │ └── uipopt.h │ │ ├── ip64 │ │ │ ├── README.md │ │ │ ├── ip64-addrmap.c │ │ │ ├── ip64-addrmap.h │ │ │ ├── ip64-arp.c │ │ │ ├── ip64-arp.h │ │ │ ├── ip64-conf-example.h │ │ │ ├── ip64-dhcpc.c │ │ │ ├── ip64-dhcpc.h │ │ │ ├── ip64-dns64.c │ │ │ ├── ip64-dns64.h │ │ │ ├── ip64-driver.h │ │ │ ├── ip64-eth-interface.c │ │ │ ├── ip64-eth-interface.h │ │ │ ├── ip64-eth.c │ │ │ ├── ip64-eth.h │ │ │ ├── ip64-interface.h │ │ │ ├── ip64-ipv4-dhcp.c │ │ │ ├── ip64-ipv4-dhcp.h │ │ │ ├── ip64-null-driver.c │ │ │ ├── ip64-null-driver.h │ │ │ ├── ip64-slip-interface.c │ │ │ ├── ip64-slip-interface.h │ │ │ ├── ip64-special-ports.c │ │ │ ├── ip64-special-ports.h │ │ │ ├── ip64.c │ │ │ └── ip64.h │ │ ├── ipv4 │ │ │ ├── uaodv-def.h │ │ │ ├── uaodv-rt.c │ │ │ ├── uaodv-rt.h │ │ │ ├── uaodv.c │ │ │ ├── uaodv.h │ │ │ ├── uip-fw-drv.c │ │ │ ├── uip-fw-drv.h │ │ │ ├── uip-fw.c │ │ │ ├── uip-fw.h │ │ │ ├── uip-neighbor.c │ │ │ ├── uip-neighbor.h │ │ │ ├── uip-over-mesh.c │ │ │ ├── uip-over-mesh.h │ │ │ ├── uip.c │ │ │ ├── uip_arp.c │ │ │ └── uip_arp.h │ │ ├── ipv6 │ │ │ ├── multicast │ │ │ │ ├── README.md │ │ │ │ ├── roll-tm.c │ │ │ │ ├── roll-tm.h │ │ │ │ ├── smrf.c │ │ │ │ ├── smrf.h │ │ │ │ ├── uip-mcast6-engines.h │ │ │ │ ├── uip-mcast6-route.c │ │ │ │ ├── uip-mcast6-route.h │ │ │ │ ├── uip-mcast6-stats.c │ │ │ │ ├── uip-mcast6-stats.h │ │ │ │ └── uip-mcast6.h │ │ │ ├── sicslowpan.c │ │ │ ├── sicslowpan.h │ │ │ ├── uip-ds6-nbr.c │ │ │ ├── uip-ds6-nbr.h │ │ │ ├── uip-ds6-route.c │ │ │ ├── uip-ds6-route.h │ │ │ ├── uip-ds6.c │ │ │ ├── uip-ds6.h │ │ │ ├── uip-icmp6.c │ │ │ ├── uip-icmp6.h │ │ │ ├── uip-nd6.c │ │ │ ├── uip-nd6.h │ │ │ └── uip6.c │ │ ├── linkaddr.c │ │ ├── linkaddr.h │ │ ├── llsec │ │ │ ├── anti-replay.c │ │ │ ├── anti-replay.h │ │ │ ├── ccm-star-packetbuf.c │ │ │ ├── ccm-star-packetbuf.h │ │ │ ├── llsec.h │ │ │ ├── llsec802154.h │ │ │ ├── noncoresec │ │ │ │ ├── noncoresec.c │ │ │ │ └── noncoresec.h │ │ │ ├── nullsec.c │ │ │ └── nullsec.h │ │ ├── mac │ │ │ ├── contikimac │ │ │ │ ├── contikimac-framer.c │ │ │ │ ├── contikimac-framer.h │ │ │ │ ├── contikimac.c │ │ │ │ └── contikimac.h │ │ │ ├── csma.c │ │ │ ├── csma.h │ │ │ ├── cxmac │ │ │ │ ├── cxmac.c │ │ │ │ └── cxmac.h │ │ │ ├── frame802154.c │ │ │ ├── frame802154.h │ │ │ ├── frame802154e-ie.c │ │ │ ├── frame802154e-ie.h │ │ │ ├── framer-802154.c │ │ │ ├── framer-802154.h │ │ │ ├── framer-nullmac.c │ │ │ ├── framer-nullmac.h │ │ │ ├── framer.h │ │ │ ├── mac-sequence.c │ │ │ ├── mac-sequence.h │ │ │ ├── mac.c │ │ │ ├── mac.h │ │ │ ├── nordc.c │ │ │ ├── nullmac.c │ │ │ ├── nullmac.h │ │ │ ├── nullrdc-noframer.c │ │ │ ├── nullrdc-noframer.h │ │ │ ├── nullrdc.c │ │ │ ├── nullrdc.h │ │ │ ├── phase.c │ │ │ ├── phase.h │ │ │ ├── rdc.h │ │ │ ├── sicslowmac │ │ │ │ ├── sicslowmac.c │ │ │ │ └── sicslowmac.h │ │ │ └── tsch │ │ │ │ ├── Makefile.tsch │ │ │ │ ├── README.md │ │ │ │ ├── tsch-adaptive-timesync.c │ │ │ │ ├── tsch-adaptive-timesync.h │ │ │ │ ├── tsch-asn.h │ │ │ │ ├── tsch-conf.h │ │ │ │ ├── tsch-log.c │ │ │ │ ├── tsch-log.h │ │ │ │ ├── tsch-packet.c │ │ │ │ ├── tsch-packet.h │ │ │ │ ├── tsch-private.h │ │ │ │ ├── tsch-queue.c │ │ │ │ ├── tsch-queue.h │ │ │ │ ├── tsch-rpl.c │ │ │ │ ├── tsch-rpl.h │ │ │ │ ├── tsch-schedule.c │ │ │ │ ├── tsch-schedule.h │ │ │ │ ├── tsch-security.c │ │ │ │ ├── tsch-security.h │ │ │ │ ├── tsch-slot-operation.c │ │ │ │ ├── tsch-slot-operation.h │ │ │ │ ├── tsch.c │ │ │ │ └── tsch.h │ │ ├── nbr-table.c │ │ ├── nbr-table.h │ │ ├── netstack.c │ │ ├── netstack.h │ │ ├── packetbuf.c │ │ ├── packetbuf.h │ │ ├── queuebuf.c │ │ ├── queuebuf.h │ │ ├── rime │ │ │ ├── abc.c │ │ │ ├── abc.h │ │ │ ├── announcement.c │ │ │ ├── announcement.h │ │ │ ├── broadcast-announcement.c │ │ │ ├── broadcast-announcement.h │ │ │ ├── broadcast.c │ │ │ ├── broadcast.h │ │ │ ├── chameleon-bitopt.c │ │ │ ├── chameleon-bitopt.h │ │ │ ├── chameleon-raw.c │ │ │ ├── chameleon-raw.h │ │ │ ├── chameleon.c │ │ │ ├── chameleon.h │ │ │ ├── channel.c │ │ │ ├── channel.h │ │ │ ├── collect-link-estimate.c │ │ │ ├── collect-link-estimate.h │ │ │ ├── collect-neighbor.c │ │ │ ├── collect-neighbor.h │ │ │ ├── collect.c │ │ │ ├── collect.h │ │ │ ├── ipolite.c │ │ │ ├── ipolite.h │ │ │ ├── mesh.c │ │ │ ├── mesh.h │ │ │ ├── multihop.c │ │ │ ├── multihop.h │ │ │ ├── neighbor-discovery.c │ │ │ ├── neighbor-discovery.h │ │ │ ├── netflood.c │ │ │ ├── netflood.h │ │ │ ├── packetqueue.c │ │ │ ├── packetqueue.h │ │ │ ├── polite-announcement.c │ │ │ ├── polite-announcement.h │ │ │ ├── polite.c │ │ │ ├── polite.h │ │ │ ├── rime.c │ │ │ ├── rime.h │ │ │ ├── rimestats.c │ │ │ ├── rimestats.h │ │ │ ├── rmh.c │ │ │ ├── rmh.h │ │ │ ├── route-discovery.c │ │ │ ├── route-discovery.h │ │ │ ├── route.c │ │ │ ├── route.h │ │ │ ├── rucb.c │ │ │ ├── rucb.h │ │ │ ├── rudolph1.c │ │ │ ├── rudolph1.h │ │ │ ├── rudolph2.c │ │ │ ├── rudolph2.h │ │ │ ├── runicast.c │ │ │ ├── runicast.h │ │ │ ├── stbroadcast.c │ │ │ ├── stbroadcast.h │ │ │ ├── stunicast.c │ │ │ ├── stunicast.h │ │ │ ├── timesynch.c │ │ │ ├── timesynch.h │ │ │ ├── trickle.c │ │ │ ├── trickle.h │ │ │ ├── unicast.c │ │ │ └── unicast.h │ │ └── rpl │ │ │ ├── rpl-conf.h │ │ │ ├── rpl-dag-root.c │ │ │ ├── rpl-dag-root.h │ │ │ ├── rpl-dag.c │ │ │ ├── rpl-ext-header.c │ │ │ ├── rpl-icmp6.c │ │ │ ├── rpl-mrhof.c │ │ │ ├── rpl-of0.c │ │ │ ├── rpl-private.h │ │ │ ├── rpl-timers.c │ │ │ ├── rpl.c │ │ │ └── rpl.h │ └── sys │ │ ├── arg.c │ │ ├── arg.h │ │ ├── autostart.c │ │ ├── autostart.h │ │ ├── cc-gcc.h │ │ ├── cc.h │ │ ├── clock.h │ │ ├── compower.c │ │ ├── compower.h │ │ ├── ctimer.c │ │ ├── ctimer.h │ │ ├── dsc.h │ │ ├── energest.c │ │ ├── energest.h │ │ ├── etimer.c │ │ ├── etimer.h │ │ ├── lc-addrlabels.h │ │ ├── lc-switch.h │ │ ├── lc.h │ │ ├── loader.h │ │ ├── log.h │ │ ├── mt.c │ │ ├── mt.h │ │ ├── node-id.h │ │ ├── process.c │ │ ├── process.h │ │ ├── procinit.c │ │ ├── procinit.h │ │ ├── pt-sem.h │ │ ├── pt.h │ │ ├── rtimer.c │ │ ├── rtimer.h │ │ ├── stimer.c │ │ ├── stimer.h │ │ ├── subprocess.h │ │ ├── timer.c │ │ └── timer.h ├── cpu │ ├── arm │ │ ├── aducrf101 │ │ │ ├── Common │ │ │ │ ├── ADuCRF101.h │ │ │ │ ├── GCC │ │ │ │ │ ├── ADuCRF101.ld │ │ │ │ │ └── crt0.S │ │ │ │ ├── IAR │ │ │ │ │ ├── ADUCRF101.icf │ │ │ │ │ ├── Retarget.c │ │ │ │ │ └── startup_ADuCRF101.S │ │ │ │ ├── RealView │ │ │ │ │ ├── Retarget.c │ │ │ │ │ └── startup_ADuCRF101.s │ │ │ │ ├── aducrf101-include.h │ │ │ │ ├── defs.h │ │ │ │ ├── radioeng.c │ │ │ │ ├── radioeng.h │ │ │ │ ├── system_ADuCRF101.c │ │ │ │ └── system_ADuCRF101.h │ │ │ ├── Makefile.aducrf101 │ │ │ ├── Makefile.aducrf101.gnu │ │ │ ├── Makefile.aducrf101.iar │ │ │ ├── aducrf101-contiki.h │ │ │ ├── clock.c │ │ │ ├── dev │ │ │ │ ├── radio.c │ │ │ │ ├── uart.c │ │ │ │ ├── uart.h │ │ │ │ ├── uart0.h │ │ │ │ ├── uart1.h │ │ │ │ └── watchdog.c │ │ │ ├── mtarch.h │ │ │ ├── rtimer-arch.c │ │ │ ├── rtimer-arch.h │ │ │ └── slip-arch.c │ │ ├── arm.txt │ │ ├── at91sam7s │ │ │ ├── AT91SAM7S-ROM.ld │ │ │ ├── AT91SAM7S128-ROM.ld │ │ │ ├── AT91SAM7S128.h │ │ │ ├── AT91SAM7S256.h │ │ │ ├── AT91SAM7S64-ROM.ld │ │ │ ├── AT91SAM7S64.h │ │ │ ├── Makefile.at91sam7s │ │ │ ├── builtins.awk │ │ │ ├── cfs-sdcard-arch.c │ │ │ ├── clock.c │ │ │ ├── debug-uart.c │ │ │ ├── debug-uart.h │ │ │ ├── efs-sdcard-arch.c │ │ │ ├── elfloader-arm.c │ │ │ ├── interrupt-utils.c │ │ │ ├── interrupt-utils.h │ │ │ ├── io.h │ │ │ ├── loader │ │ │ │ ├── codeprop-otf.c │ │ │ │ ├── codeprop-otf.h │ │ │ │ ├── elfloader-arch-otf.h │ │ │ │ ├── elfloader-otf.c │ │ │ │ ├── elfloader-otf.h │ │ │ │ ├── empty-symbols.c │ │ │ │ ├── ram-segments.c │ │ │ │ └── ram-segments.h │ │ │ ├── merge-rodata.ld │ │ │ ├── newlib-syscalls.c │ │ │ ├── openocd │ │ │ │ ├── AT91SAM7x_init.script │ │ │ │ ├── arm7_wig.cfg │ │ │ │ ├── arm7_wig_flash.cfg │ │ │ │ ├── arm7_wig_reset.cfg │ │ │ │ ├── openocd_flash │ │ │ │ ├── openocd_reset │ │ │ │ └── target │ │ │ │ │ └── sam7s.cfg │ │ │ ├── pit-interrupt.h │ │ │ ├── rtimer-arch-interrupt.c │ │ │ ├── rtimer-arch-interrupt.h │ │ │ ├── rtimer-arch.c │ │ │ ├── rtimer-arch.h │ │ │ ├── sdcard-arch.c │ │ │ ├── startup-SAM7S-arm.c │ │ │ ├── startup-SAM7S.c │ │ │ ├── sys-interrupt.c │ │ │ ├── sys-interrupt.h │ │ │ ├── uip-log.c │ │ │ ├── usb-arch.c │ │ │ ├── usb-interrupt.c │ │ │ └── usb-interrupt.h │ │ ├── common │ │ │ ├── CMSIS │ │ │ │ ├── core.txt │ │ │ │ ├── core_cm0.h │ │ │ │ ├── core_cm0plus.h │ │ │ │ ├── core_cm3.h │ │ │ │ ├── core_cm4.h │ │ │ │ ├── core_cm4_simd.h │ │ │ │ ├── core_cmFunc.h │ │ │ │ ├── core_cmInstr.h │ │ │ │ ├── core_sc000.h │ │ │ │ └── core_sc300.h │ │ │ ├── SD-card │ │ │ │ ├── Makefile.sdcard │ │ │ │ ├── cfs-sdcard.c │ │ │ │ ├── config.h │ │ │ │ ├── efs-sdcard.h │ │ │ │ ├── efsl_spi.h │ │ │ │ └── sdcard.h │ │ │ ├── dbg-io │ │ │ │ ├── dbg-printf.c │ │ │ │ ├── dbg-putchar.c │ │ │ │ ├── dbg-puts.c │ │ │ │ ├── dbg-snprintf.c │ │ │ │ ├── dbg-sprintf.c │ │ │ │ ├── strformat.c │ │ │ │ └── strformat.h │ │ │ └── usb │ │ │ │ ├── Makefile.usb │ │ │ │ ├── cdc-acm │ │ │ │ ├── cdc-acm-descriptors.c │ │ │ │ ├── cdc-acm-string-descriptors.xml │ │ │ │ ├── cdc-acm.c │ │ │ │ ├── cdc-acm.h │ │ │ │ └── cdc.h │ │ │ │ ├── cdc-eth │ │ │ │ ├── cdc-eth-descriptors.c │ │ │ │ ├── cdc-eth-string-descriptors.c │ │ │ │ ├── cdc-eth.c │ │ │ │ ├── cdc-eth.h │ │ │ │ ├── dhcps.c │ │ │ │ └── dhcps.h │ │ │ │ ├── descriptors.h │ │ │ │ ├── msc │ │ │ │ ├── msc-descriptors.c │ │ │ │ ├── msc-string-descriptors.xml │ │ │ │ ├── rbc_const.h │ │ │ │ ├── rbc_struct.h │ │ │ │ ├── scsi_command.h │ │ │ │ ├── scsi_sense.h │ │ │ │ ├── scsi_struct.h │ │ │ │ ├── spc2_const.h │ │ │ │ ├── spc2_struct.h │ │ │ │ ├── usb-msc-bulk.c │ │ │ │ ├── usb-msc-bulk.h │ │ │ │ └── usb-rbc.c │ │ │ │ ├── string-descriptors.dtd │ │ │ │ ├── string-descriptors.h │ │ │ │ ├── string-descriptors.xslt │ │ │ │ ├── usb-api.h │ │ │ │ ├── usb-arch.h │ │ │ │ ├── usb-core.c │ │ │ │ ├── usb-core.h │ │ │ │ └── usb.h │ │ ├── openocd │ │ │ ├── arm7_wig.cfg │ │ │ └── target │ │ │ │ └── stm32F10xxx.cfg │ │ ├── stm32f103 │ │ │ ├── Makefile.stm32f103 │ │ │ ├── STM32F103CB.ld │ │ │ ├── clock.c │ │ │ ├── cortexm3_macro.h │ │ │ ├── debug-uart.c │ │ │ ├── debug-uart.h │ │ │ ├── gpio.h │ │ │ ├── nvic.h │ │ │ ├── rtimer-arch.h │ │ │ ├── sdcard-arch.c │ │ │ ├── startup-STM32F10x.c │ │ │ ├── stm32f10x_conf.h │ │ │ ├── stm32f10x_dma.h │ │ │ ├── stm32f10x_map.h │ │ │ ├── stm32f10x_nvic.h │ │ │ ├── stm32f10x_type.h │ │ │ ├── usb-arch.c │ │ │ └── usb-stm32f103.h │ │ └── stm32l152 │ │ │ ├── Makefile.stm32l152 │ │ │ ├── Makefile.stm32l152.gnu │ │ │ ├── Makefile.stm32l152.iar │ │ │ ├── clock.c │ │ │ ├── console.c │ │ │ ├── console.h │ │ │ ├── crt.c │ │ │ ├── lib │ │ │ ├── e_stdio_intonly_thumb2.a │ │ │ ├── e_stdio_thumb2.a │ │ │ └── smallprintf_thumb2.a │ │ │ ├── mtarch.h │ │ │ ├── regs.h │ │ │ ├── rtimer-arch.c │ │ │ ├── rtimer-arch.h │ │ │ ├── syscalls.c │ │ │ ├── uart.c │ │ │ └── watchdog.c │ ├── cc26xx-cc13xx │ │ ├── Makefile.cc13xx │ │ ├── Makefile.cc26xx │ │ ├── Makefile.cc26xx-cc13xx │ │ ├── cc26xx.ld │ │ ├── clock.c │ │ ├── dbg.h │ │ ├── debug-uart.h │ │ ├── dev │ │ │ ├── batmon-sensor.c │ │ │ ├── batmon-sensor.h │ │ │ ├── cc26xx-uart.c │ │ │ ├── cc26xx-uart.h │ │ │ ├── contiki-watchdog.c │ │ │ ├── gpio-interrupt.c │ │ │ ├── gpio-interrupt.h │ │ │ ├── oscillators.c │ │ │ ├── oscillators.h │ │ │ ├── soc-rtc.c │ │ │ ├── soc-rtc.h │ │ │ └── uart1.h │ │ ├── fault-handlers.c │ │ ├── ieee-addr.c │ │ ├── ieee-addr.h │ │ ├── lib │ │ │ ├── cc13xxware │ │ │ │ ├── README.md │ │ │ │ ├── driverlib │ │ │ │ │ ├── adi.c │ │ │ │ │ ├── adi.h │ │ │ │ │ ├── aon_batmon.c │ │ │ │ │ ├── aon_batmon.h │ │ │ │ │ ├── aon_event.c │ │ │ │ │ ├── aon_event.h │ │ │ │ │ ├── aon_ioc.c │ │ │ │ │ ├── aon_ioc.h │ │ │ │ │ ├── aon_rtc.c │ │ │ │ │ ├── aon_rtc.h │ │ │ │ │ ├── aon_wuc.c │ │ │ │ │ ├── aon_wuc.h │ │ │ │ │ ├── aux_adc.c │ │ │ │ │ ├── aux_adc.h │ │ │ │ │ ├── aux_smph.c │ │ │ │ │ ├── aux_smph.h │ │ │ │ │ ├── aux_tdc.c │ │ │ │ │ ├── aux_tdc.h │ │ │ │ │ ├── aux_timer.c │ │ │ │ │ ├── aux_timer.h │ │ │ │ │ ├── aux_wuc.c │ │ │ │ │ ├── aux_wuc.h │ │ │ │ │ ├── ccfgread.c │ │ │ │ │ ├── ccfgread.h │ │ │ │ │ ├── chipinfo.c │ │ │ │ │ ├── chipinfo.h │ │ │ │ │ ├── cpu.c │ │ │ │ │ ├── cpu.h │ │ │ │ │ ├── crypto.c │ │ │ │ │ ├── crypto.h │ │ │ │ │ ├── ddi.c │ │ │ │ │ ├── ddi.h │ │ │ │ │ ├── debug.h │ │ │ │ │ ├── driverlib_release.c │ │ │ │ │ ├── driverlib_release.h │ │ │ │ │ ├── event.c │ │ │ │ │ ├── event.h │ │ │ │ │ ├── flash.c │ │ │ │ │ ├── flash.h │ │ │ │ │ ├── flashsafe.c │ │ │ │ │ ├── flashsafe.h │ │ │ │ │ ├── gpio.c │ │ │ │ │ ├── gpio.h │ │ │ │ │ ├── i2c.c │ │ │ │ │ ├── i2c.h │ │ │ │ │ ├── i2s.c │ │ │ │ │ ├── i2s.h │ │ │ │ │ ├── interrupt.c │ │ │ │ │ ├── interrupt.h │ │ │ │ │ ├── ioc.c │ │ │ │ │ ├── ioc.h │ │ │ │ │ ├── osc.c │ │ │ │ │ ├── osc.h │ │ │ │ │ ├── prcm.c │ │ │ │ │ ├── prcm.h │ │ │ │ │ ├── pwr_ctrl.c │ │ │ │ │ ├── pwr_ctrl.h │ │ │ │ │ ├── rf_common_cmd.h │ │ │ │ │ ├── rf_data_entry.h │ │ │ │ │ ├── rf_mailbox.h │ │ │ │ │ ├── rf_prop_cmd.h │ │ │ │ │ ├── rf_prop_mailbox.h │ │ │ │ │ ├── rfc.c │ │ │ │ │ ├── rfc.h │ │ │ │ │ ├── rom.h │ │ │ │ │ ├── setup.c │ │ │ │ │ ├── setup.h │ │ │ │ │ ├── smph.c │ │ │ │ │ ├── smph.h │ │ │ │ │ ├── ssi.c │ │ │ │ │ ├── ssi.h │ │ │ │ │ ├── sys_ctrl.c │ │ │ │ │ ├── sys_ctrl.h │ │ │ │ │ ├── systick.c │ │ │ │ │ ├── systick.h │ │ │ │ │ ├── timer.c │ │ │ │ │ ├── timer.h │ │ │ │ │ ├── trng.c │ │ │ │ │ ├── trng.h │ │ │ │ │ ├── uart.c │ │ │ │ │ ├── uart.h │ │ │ │ │ ├── udma.c │ │ │ │ │ ├── udma.h │ │ │ │ │ ├── vims.c │ │ │ │ │ ├── vims.h │ │ │ │ │ ├── watchdog.c │ │ │ │ │ └── watchdog.h │ │ │ │ ├── inc │ │ │ │ │ ├── asmdefs.h │ │ │ │ │ ├── hw_adi.h │ │ │ │ │ ├── hw_adi_0_rf.h │ │ │ │ │ ├── hw_adi_1_synth.h │ │ │ │ │ ├── hw_adi_2_refsys.h │ │ │ │ │ ├── hw_adi_3_refsys.h │ │ │ │ │ ├── hw_adi_4_aux.h │ │ │ │ │ ├── hw_aon_batmon.h │ │ │ │ │ ├── hw_aon_event.h │ │ │ │ │ ├── hw_aon_ioc.h │ │ │ │ │ ├── hw_aon_rtc.h │ │ │ │ │ ├── hw_aon_sysctl.h │ │ │ │ │ ├── hw_aon_wuc.h │ │ │ │ │ ├── hw_aux_aiodio.h │ │ │ │ │ ├── hw_aux_anaif.h │ │ │ │ │ ├── hw_aux_evctl.h │ │ │ │ │ ├── hw_aux_sce.h │ │ │ │ │ ├── hw_aux_smph.h │ │ │ │ │ ├── hw_aux_tdc.h │ │ │ │ │ ├── hw_aux_timer.h │ │ │ │ │ ├── hw_aux_wuc.h │ │ │ │ │ ├── hw_ccfg.h │ │ │ │ │ ├── hw_ccfg_simple_struct.h │ │ │ │ │ ├── hw_chip_def.h │ │ │ │ │ ├── hw_cpu_dwt.h │ │ │ │ │ ├── hw_cpu_fpb.h │ │ │ │ │ ├── hw_cpu_itm.h │ │ │ │ │ ├── hw_cpu_rom_table.h │ │ │ │ │ ├── hw_cpu_scs.h │ │ │ │ │ ├── hw_cpu_tiprop.h │ │ │ │ │ ├── hw_cpu_tpiu.h │ │ │ │ │ ├── hw_crypto.h │ │ │ │ │ ├── hw_ddi.h │ │ │ │ │ ├── hw_ddi_0_osc.h │ │ │ │ │ ├── hw_device.h │ │ │ │ │ ├── hw_event.h │ │ │ │ │ ├── hw_fcfg1.h │ │ │ │ │ ├── hw_flash.h │ │ │ │ │ ├── hw_gpio.h │ │ │ │ │ ├── hw_gpt.h │ │ │ │ │ ├── hw_i2c.h │ │ │ │ │ ├── hw_i2s.h │ │ │ │ │ ├── hw_ints.h │ │ │ │ │ ├── hw_ioc.h │ │ │ │ │ ├── hw_memmap.h │ │ │ │ │ ├── hw_nvic.h │ │ │ │ │ ├── hw_prcm.h │ │ │ │ │ ├── hw_rfc_dbell.h │ │ │ │ │ ├── hw_rfc_pwr.h │ │ │ │ │ ├── hw_rfc_rat.h │ │ │ │ │ ├── hw_smph.h │ │ │ │ │ ├── hw_ssi.h │ │ │ │ │ ├── hw_sysctl.h │ │ │ │ │ ├── hw_trng.h │ │ │ │ │ ├── hw_types.h │ │ │ │ │ ├── hw_uart.h │ │ │ │ │ ├── hw_udma.h │ │ │ │ │ ├── hw_vims.h │ │ │ │ │ └── hw_wdt.h │ │ │ │ ├── rf_patches │ │ │ │ │ └── rf_patch_cpe_genfsk.h │ │ │ │ └── startup_files │ │ │ │ │ ├── ccfg.c │ │ │ │ │ └── startup_gcc.c │ │ │ └── cc26xxware │ │ │ │ ├── README.md │ │ │ │ ├── driverlib │ │ │ │ ├── adi.c │ │ │ │ ├── adi.h │ │ │ │ ├── aon_batmon.c │ │ │ │ ├── aon_batmon.h │ │ │ │ ├── aon_event.c │ │ │ │ ├── aon_event.h │ │ │ │ ├── aon_ioc.c │ │ │ │ ├── aon_ioc.h │ │ │ │ ├── aon_rtc.c │ │ │ │ ├── aon_rtc.h │ │ │ │ ├── aon_wuc.c │ │ │ │ ├── aon_wuc.h │ │ │ │ ├── aux_adc.c │ │ │ │ ├── aux_adc.h │ │ │ │ ├── aux_smph.c │ │ │ │ ├── aux_smph.h │ │ │ │ ├── aux_tdc.c │ │ │ │ ├── aux_tdc.h │ │ │ │ ├── aux_timer.c │ │ │ │ ├── aux_timer.h │ │ │ │ ├── aux_wuc.c │ │ │ │ ├── aux_wuc.h │ │ │ │ ├── ccfgread.c │ │ │ │ ├── ccfgread.h │ │ │ │ ├── chipinfo.c │ │ │ │ ├── chipinfo.h │ │ │ │ ├── cpu.c │ │ │ │ ├── cpu.h │ │ │ │ ├── crypto.c │ │ │ │ ├── crypto.h │ │ │ │ ├── ddi.c │ │ │ │ ├── ddi.h │ │ │ │ ├── debug.h │ │ │ │ ├── driverlib_release.c │ │ │ │ ├── driverlib_release.h │ │ │ │ ├── event.c │ │ │ │ ├── event.h │ │ │ │ ├── flash.c │ │ │ │ ├── flash.h │ │ │ │ ├── flashsafe.c │ │ │ │ ├── flashsafe.h │ │ │ │ ├── gpio.c │ │ │ │ ├── gpio.h │ │ │ │ ├── i2c.c │ │ │ │ ├── i2c.h │ │ │ │ ├── i2s.c │ │ │ │ ├── i2s.h │ │ │ │ ├── interrupt.c │ │ │ │ ├── interrupt.h │ │ │ │ ├── ioc.c │ │ │ │ ├── ioc.h │ │ │ │ ├── osc.c │ │ │ │ ├── osc.h │ │ │ │ ├── prcm.c │ │ │ │ ├── prcm.h │ │ │ │ ├── pwr_ctrl.c │ │ │ │ ├── pwr_ctrl.h │ │ │ │ ├── rfc.c │ │ │ │ ├── rfc.h │ │ │ │ ├── rom.h │ │ │ │ ├── setup.c │ │ │ │ ├── setup.h │ │ │ │ ├── smph.c │ │ │ │ ├── smph.h │ │ │ │ ├── ssi.c │ │ │ │ ├── ssi.h │ │ │ │ ├── sys_ctrl.c │ │ │ │ ├── sys_ctrl.h │ │ │ │ ├── systick.c │ │ │ │ ├── systick.h │ │ │ │ ├── timer.c │ │ │ │ ├── timer.h │ │ │ │ ├── trng.c │ │ │ │ ├── trng.h │ │ │ │ ├── uart.c │ │ │ │ ├── uart.h │ │ │ │ ├── udma.c │ │ │ │ ├── udma.h │ │ │ │ ├── vims.c │ │ │ │ ├── vims.h │ │ │ │ ├── watchdog.c │ │ │ │ └── watchdog.h │ │ │ │ ├── inc │ │ │ │ ├── asmdefs.h │ │ │ │ ├── hw_adi.h │ │ │ │ ├── hw_adi_0_rf.h │ │ │ │ ├── hw_adi_1_synth.h │ │ │ │ ├── hw_adi_2_refsys.h │ │ │ │ ├── hw_adi_3_refsys.h │ │ │ │ ├── hw_adi_4_aux.h │ │ │ │ ├── hw_aon_batmon.h │ │ │ │ ├── hw_aon_event.h │ │ │ │ ├── hw_aon_ioc.h │ │ │ │ ├── hw_aon_rtc.h │ │ │ │ ├── hw_aon_sysctl.h │ │ │ │ ├── hw_aon_wuc.h │ │ │ │ ├── hw_aux_aiodio.h │ │ │ │ ├── hw_aux_anaif.h │ │ │ │ ├── hw_aux_evctl.h │ │ │ │ ├── hw_aux_sce.h │ │ │ │ ├── hw_aux_smph.h │ │ │ │ ├── hw_aux_tdc.h │ │ │ │ ├── hw_aux_timer.h │ │ │ │ ├── hw_aux_wuc.h │ │ │ │ ├── hw_ccfg.h │ │ │ │ ├── hw_ccfg_simple_struct.h │ │ │ │ ├── hw_chip_def.h │ │ │ │ ├── hw_cpu_dwt.h │ │ │ │ ├── hw_cpu_fpb.h │ │ │ │ ├── hw_cpu_itm.h │ │ │ │ ├── hw_cpu_rom_table.h │ │ │ │ ├── hw_cpu_scs.h │ │ │ │ ├── hw_cpu_tiprop.h │ │ │ │ ├── hw_cpu_tpiu.h │ │ │ │ ├── hw_crypto.h │ │ │ │ ├── hw_ddi.h │ │ │ │ ├── hw_ddi_0_osc.h │ │ │ │ ├── hw_device.h │ │ │ │ ├── hw_event.h │ │ │ │ ├── hw_fcfg1.h │ │ │ │ ├── hw_flash.h │ │ │ │ ├── hw_gpio.h │ │ │ │ ├── hw_gpt.h │ │ │ │ ├── hw_i2c.h │ │ │ │ ├── hw_i2s.h │ │ │ │ ├── hw_ints.h │ │ │ │ ├── hw_ioc.h │ │ │ │ ├── hw_memmap.h │ │ │ │ ├── hw_nvic.h │ │ │ │ ├── hw_prcm.h │ │ │ │ ├── hw_rfc_dbell.h │ │ │ │ ├── hw_rfc_pwr.h │ │ │ │ ├── hw_rfc_rat.h │ │ │ │ ├── hw_smph.h │ │ │ │ ├── hw_ssi.h │ │ │ │ ├── hw_sysctl.h │ │ │ │ ├── hw_trng.h │ │ │ │ ├── hw_types.h │ │ │ │ ├── hw_uart.h │ │ │ │ ├── hw_udma.h │ │ │ │ ├── hw_vims.h │ │ │ │ └── hw_wdt.h │ │ │ │ └── startup_files │ │ │ │ ├── ccfg.c │ │ │ │ └── startup_gcc.c │ │ ├── lpm.c │ │ ├── lpm.h │ │ ├── mtarch.h │ │ ├── putchar.c │ │ ├── rf-core │ │ │ ├── api │ │ │ │ ├── ble_cmd.h │ │ │ │ ├── ble_mailbox.h │ │ │ │ ├── common_cmd.h │ │ │ │ ├── data_entry.h │ │ │ │ ├── ieee_cmd.h │ │ │ │ ├── ieee_mailbox.h │ │ │ │ ├── mailbox.h │ │ │ │ ├── prop_cmd.h │ │ │ │ └── prop_mailbox.h │ │ │ ├── dot-15-4g.h │ │ │ ├── ieee-mode.c │ │ │ ├── prop-mode.c │ │ │ ├── rf-ble.c │ │ │ ├── rf-ble.h │ │ │ ├── rf-core.c │ │ │ ├── rf-core.h │ │ │ ├── smartrf-settings.c │ │ │ └── smartrf-settings.h │ │ ├── rtimer-arch.c │ │ ├── rtimer-arch.h │ │ ├── slip-arch.c │ │ └── ti-lib.h │ └── native │ │ ├── Makefile.native │ │ ├── dev │ │ ├── eeprom.c │ │ └── uart1.h │ │ ├── mtarch.c │ │ ├── mtarch.h │ │ ├── net │ │ ├── README-WPCAP.md │ │ ├── linuxradio-drv.c │ │ ├── linuxradio-drv.h │ │ ├── tapdev-drv.c │ │ ├── tapdev-drv.h │ │ ├── tapdev.c │ │ ├── tapdev.h │ │ ├── tapdev6.c │ │ ├── tapdev6.h │ │ ├── wpcap-drv.c │ │ ├── wpcap-drv.h │ │ ├── wpcap.c │ │ └── wpcap.h │ │ ├── rtimer-arch.c │ │ ├── rtimer-arch.h │ │ └── watchdog.c ├── examples │ └── tr16-badge │ │ ├── Makefile │ │ ├── Makefile.target │ │ ├── badgeName.h │ │ └── tr16-badge.c ├── lib │ └── newlib │ │ └── syscalls.c └── platform │ └── tr16-badge │ ├── Makefile.tr16-badge │ ├── badge │ ├── ADS7846.c │ ├── ADS7846.h │ ├── GraphicsLib.c │ ├── GraphicsLib.h │ ├── Makefile.badge │ ├── badge-sensors.c │ ├── board-peripherals.h │ ├── board-spi.c │ ├── board-spi.h │ ├── board.c │ ├── button-sensor.c │ ├── button-sensor.h │ ├── cc13xx │ │ ├── Makefile.cc13xx │ │ └── board.h │ ├── digitalWriteFast.h │ ├── eeprom.c │ ├── ext-flash.c │ ├── ext-flash.h │ ├── font_7x12.c │ ├── fonts.h │ ├── lcd.c │ ├── lcd.h │ ├── leds-arch.c │ ├── pwm.c │ ├── pwm.h │ ├── troopers_agenda.c │ ├── troopers_agenda.h │ ├── troopers_config.h │ ├── troopers_eeprom.c │ ├── troopers_eeprom.h │ ├── troopers_helpers.c │ ├── troopers_helpers.h │ ├── troopers_identity.c │ ├── troopers_identity.h │ ├── troopers_message_handling.c │ ├── troopers_message_handling.h │ ├── troopers_rfc_cmd.c │ ├── troopers_rfc_cmd.h │ ├── troopers_rfc_settings.c │ └── troopers_rfc_settings.h │ ├── contiki-conf.h │ └── contiki-main.c ├── flash ├── flasher.py ├── minirc.dfl ├── requirements.txt └── rf_troopers16.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.elf 2 | *.bin 3 | *.o 4 | *.lck 5 | *.lock 6 | *.map 7 | *./bin/* 8 | *.b#* 9 | *.s#* 10 | *.l#* 11 | *.a 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TR16Badge 2 | -------------------------------------------------------------------------------- /contiki/LICENSE: -------------------------------------------------------------------------------- 1 | Contiki is licensed under the 3-clause BSD license. This license gives 2 | everyone the right to use and distribute the code, either in binary or 3 | source code format, as long as the copyright license is retained in 4 | the source code. 5 | 6 | The copyright for different parts of the code is held by different 7 | people and organizations, but the code is licensed under the same type 8 | of license. The license text is: 9 | 10 | * Copyright (c) (Year), (Name of copyright holder) 11 | * All rights reserved. 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions 15 | * are met: 16 | * 1. Redistributions of source code must retain the above copyright 17 | * notice, this list of conditions and the following disclaimer. 18 | * 2. Redistributions in binary form must reproduce the above copyright 19 | * notice, this list of conditions and the following disclaimer in the 20 | * documentation and/or other materials provided with the distribution. 21 | * 22 | * 3. Neither the name of the copyright holder nor the names of its 23 | * contributors may be used to endorse or promote products derived 24 | * from this software without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 29 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 30 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 31 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 32 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 33 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 35 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 37 | * OF THE POSSIBILITY OF SUCH DAMAGE. 38 | 39 | -------------------------------------------------------------------------------- /contiki/README.md: -------------------------------------------------------------------------------- 1 | The Contiki Operating System 2 | ============================ 3 | 4 | [![Build Status](https://travis-ci.org/contiki-os/contiki.svg?branch=master)](https://travis-ci.org/contiki-os/contiki/branches) 5 | 6 | Contiki is an open source operating system that runs on tiny low-power 7 | microcontrollers and makes it possible to develop applications that 8 | make efficient use of the hardware while providing standardized 9 | low-power wireless communication for a range of hardware platforms. 10 | 11 | Contiki is used in numerous commercial and non-commercial systems, 12 | such as city sound monitoring, street lights, networked electrical 13 | power meters, industrial monitoring, radiation monitoring, 14 | construction site monitoring, alarm systems, remote house monitoring, 15 | and so on. 16 | 17 | For more information, see the Contiki website: 18 | 19 | [http://contiki-os.org](http://contiki-os.org) 20 | -------------------------------------------------------------------------------- /contiki/contiki-doc/Makefile: -------------------------------------------------------------------------------- 1 | basedirs := core cpu platform apps 2 | manuals := $(shell find ./ -name "*.txt") 3 | filetypes := -iwholename "*/doc/*.txt" 4 | empty := 5 | space := $(empty) $(empty) 6 | pwd := $(shell cd ..; pwd) 7 | 8 | # Doxyfile configuration variables 9 | export docdir := . 10 | export docdirs 11 | export docsrc 12 | export doclatex := NO 13 | export docroot := ../ 14 | 15 | # Get appropriate root for doxygen path cutoff 16 | ifeq ($(HOST_OS),Windows) 17 | # on windows need to convert cygwin path to windows path for doxygen 18 | ifneq (,$(findstring cygdrive,$(pwd))) 19 | cygroot = $(subst /,$(space),$(patsubst /cygdrive/%,%,$(pwd))) 20 | export docroot = $(firstword $(cygroot)):/$(subst $(space),/,$(wordlist 2,$(words $(cygroot)),$(cygroot))) 21 | endif 22 | endif 23 | 24 | .PHONY: clean html pdf upload 25 | 26 | html: init doxygen.log 27 | 28 | pdf: doclatex = YES 29 | pdf: init doxygen.log 30 | gmake -C latex refman.pdf 31 | 32 | init: 33 | @echo "> Scanning files" 34 | 35 | # This target requires and graphviz and doxygen 36 | doxygen.log: docdirs = $(sort $(foreach dir,$(basedirs),${shell find ../${dir} -type d -not -path "*/.*" -not -path "*/obj_*"})) 37 | doxygen.log: docsrc = $(docdirs) $(foreach dir,$(docdirs),${shell find $(dir) -type f $(filetypes)}) $(manuals) 38 | doxygen.log: 39 | @doxygen Doxyfile 40 | @echo "Done, errorlog follows:" 41 | @echo "" 42 | @touch doxygen.log 43 | @cat "doxygen.log" 44 | 45 | clean: 46 | @echo "> Cleaning Documentation" 47 | @$(RM) -r "$(docdir)/html" 48 | @$(RM) -r "$(docdir)/rtf" 49 | @$(RM) -r "$(docdir)/latex" 50 | @$(RM) -r "doxygen.log" 51 | @echo " done." 52 | 53 | upload: html #pdf 54 | # scp -C latex/refman.pdf adamdunkels@shell.sourceforge.net:/home/groups/c/co/contiki/htdocs/ 55 | # tar czfv - html | ssh adamdunkels@shell.sourceforge.net "cd /home/groups/c/co/contiki/htdocs/; tar xfz -" 56 | (cd html; rsync -rv . r2d2.sics.se:/home/adam/public_html/contiki/docs) 57 | 58 | test: 59 | @echo $(docroot) 60 | @echo $(docsrc) 61 | 62 | -------------------------------------------------------------------------------- /contiki/contiki-doc/apps.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * \defgroup apps Applications 3 | * 4 | * Contiki provides a set of apps that provide functionalities such as a 5 | * web server. 6 | * 7 | * To include an App in your software project specify in you makefile 8 | @code 9 | APPS = list of apps 10 | @endcode 11 | * 12 | * @{ */ 13 | /** @} */ 14 | -------------------------------------------------------------------------------- /contiki/contiki-doc/code-style.txt: -------------------------------------------------------------------------------- 1 | /** 2 | \example code-style.c 3 | */ 4 | -------------------------------------------------------------------------------- /contiki/contiki-doc/cpu.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * \defgroup cpu Contiki CPUs 3 | * 4 | */ 5 | 6 | /** 7 | * \defgroup avr AVR 8 | * \ingroup cpu 9 | */ 10 | 11 | /** 12 | * \defgroup wireless Wireless 13 | * \ingroup avr 14 | */ 15 | 16 | /** 17 | * \defgroup arm ARM 18 | * \ingroup cpu 19 | */ 20 | 21 | /** 22 | * \defgroup stm32w-cpu STM32W108 23 | * \ingroup cpu 24 | */ 25 | 26 | /** 27 | * \defgroup ccxxx CCxxx 28 | * \ingroup cpu 29 | */ 30 | 31 | /** 32 | * \defgroup pic32 PIC32 Contiki Port 33 | * \ingroup cpu 34 | */ 35 | 36 | /** 37 | * \defgroup ADUCRF101 ADUCRF101 38 | * \ingroup cpu 39 | */ 40 | 41 | /** 42 | * \defgroup native Native 43 | * \ingroup cpu 44 | */ 45 | 46 | /** 47 | * \defgroup x86 x86 48 | * \ingroup cpu 49 | */ 50 | 51 | -------------------------------------------------------------------------------- /contiki/contiki-doc/dev.txt: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup dev Device driver APIs 3 | @{ 4 | */ 5 | /** @} */ 6 | -------------------------------------------------------------------------------- /contiki/contiki-doc/example-list.c: -------------------------------------------------------------------------------- 1 | #include "lib/list.h" 2 | 3 | struct example_list_struct { 4 | struct *next; 5 | int number; 6 | }; 7 | 8 | LIST(example_list); 9 | 10 | static struct example_list_struct element1, element2; 11 | 12 | void 13 | example_function(void) 14 | { 15 | struct example_list_struct *s; 16 | 17 | list_init(example_list); 18 | 19 | element1.number = 1; 20 | list_add(example_list, &element1); 21 | 22 | element2.number = 2; 23 | list_add(example_list, &element2); 24 | 25 | for(s = list_head(example_list); 26 | s != NULL; 27 | s = list_item_next(s)) { 28 | printf("List element number %d\n", s->number); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /contiki/contiki-doc/example-pollhandler.c: -------------------------------------------------------------------------------- 1 | #include "contiki.h" 2 | 3 | PROCESS(example_pollhandler, "Pollhandler example"); 4 | 5 | static void 6 | exithandler(void) 7 | { 8 | printf("Process exited\n"); 9 | } 10 | 11 | static void 12 | pollhandler(void) 13 | { 14 | printf("Process polled\n"); 15 | } 16 | 17 | PROCESS_THREAD(example_pollhandler, ev, data) 18 | { 19 | 20 | PROCESS_POLLHANDLER(pollhandler()); 21 | PROCESS_EXITHANDLER(exithandler()); 22 | 23 | PROCESS_BEGIN(); 24 | 25 | while(1) { 26 | PROCESS_WAIT_EVENT(); 27 | } 28 | 29 | PROCESS_END(); 30 | } 31 | -------------------------------------------------------------------------------- /contiki/contiki-doc/example-psock-client.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "contiki-net.h" 3 | 4 | static struct psock ps; 5 | static uint8_t buffer[100]; 6 | 7 | PROCESS(example_psock_client_process, "Example protosocket client"); 8 | AUTOSTART_PROCESSES(&example_psock_client_process); 9 | 10 | /*---------------------------------------------------------------------------*/ 11 | static int 12 | handle_connection(struct psock *p) 13 | { 14 | PSOCK_BEGIN(p); 15 | 16 | PSOCK_SEND_STR(p, "GET / HTTP/1.0\r\n"); 17 | PSOCK_SEND_STR(p, "Server: Contiki example protosocket client\r\n"); 18 | PSOCK_SEND_STR(p, "\r\n"); 19 | 20 | while(1) { 21 | PSOCK_READTO(p, '\n'); 22 | printf("Got: %s", buffer); 23 | } 24 | 25 | PSOCK_END(p); 26 | } 27 | /*---------------------------------------------------------------------------*/ 28 | PROCESS_THREAD(example_psock_client_process, ev, data) 29 | { 30 | uip_ipaddr_t addr; 31 | 32 | PROCESS_BEGIN(); 33 | 34 | uip_ipaddr(&addr, 192,168,2,1); 35 | tcp_connect(&addr, UIP_HTONS(80), NULL); 36 | 37 | printf("Connecting...\n"); 38 | PROCESS_WAIT_EVENT_UNTIL(ev == tcpip_event); 39 | 40 | if(uip_aborted() || uip_timedout() || uip_closed()) { 41 | printf("Could not establish connection\n"); 42 | } else if(uip_connected()) { 43 | printf("Connected\n"); 44 | 45 | PSOCK_INIT(&ps, buffer, sizeof(buffer)); 46 | 47 | do { 48 | handle_connection(&ps); 49 | PROCESS_WAIT_EVENT_UNTIL(ev == tcpip_event); 50 | } while(!(uip_closed() || uip_aborted() || uip_timedout())); 51 | 52 | printf("\nConnection closed.\n"); 53 | } 54 | PROCESS_END(); 55 | } 56 | /*---------------------------------------------------------------------------*/ 57 | -------------------------------------------------------------------------------- /contiki/contiki-doc/examples.txt: -------------------------------------------------------------------------------- 1 | /** \example example-program.c */ 2 | /** \example example-pollhandler.c */ 3 | /** \example example-list.c */ 4 | /** \example example-psock-server.c */ 5 | 6 | /** \example multi-threading.c */ 7 | 8 | /** \example example-announcement.c */ 9 | /** \example example-broadcast.c */ 10 | /** \example example-collect.c */ 11 | /** \example example-mesh.c */ 12 | /** \example example-multihop.c */ 13 | /** \example example-rucb.c */ 14 | /** \example example-rudolph1.c */ 15 | /** \example example-rudolph2.c */ 16 | /** \example example-runicast.c */ 17 | /** \example example-trickle.c */ 18 | /** \example example-unicast.c */ 19 | -------------------------------------------------------------------------------- /contiki/contiki-doc/lib.txt: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup lib Libraries 3 | @{ 4 | */ 5 | /** @} */ 6 | -------------------------------------------------------------------------------- /contiki/contiki-doc/mem.txt: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup mem Memory functions 3 | \ingroup lib 4 | */ 5 | -------------------------------------------------------------------------------- /contiki/contiki-doc/net.txt: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup net Communication stacks 3 | @{ 4 | */ 5 | /** @} */ 6 | -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/caution.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/caution.gif -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/contiki_menu_3290.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/contiki_menu_3290.jpg -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/dataframe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/dataframe.png -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/fcf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/fcf.jpg -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/layers.png -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/raven.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/raven.jpg -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/raven.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/raven.png -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/raven3290p.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/raven3290p.jpg -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/raven_detail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/raven_detail.jpg -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/ravenusb_large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/ravenusb_large.jpg -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/ravenusb_medium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/ravenusb_medium.jpg -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/ravenusb_network_connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/ravenusb_network_connections.png -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/ravenusb_shortpins.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/ravenusb_shortpins.jpg -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/tutorial-raven-basic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/tutorial-raven-basic.jpg -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/tutorial-raven-connections.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/tutorial-raven-connections.jpg -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/tutorial-raven-jtag.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/tutorial-raven-jtag.jpg -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/wireshark_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/wireshark_color.png -------------------------------------------------------------------------------- /contiki/contiki-doc/pics/wireshark_explained.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/pics/wireshark_explained.png -------------------------------------------------------------------------------- /contiki/contiki-doc/rime-doc.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/contiki-doc/rime-doc.txt -------------------------------------------------------------------------------- /contiki/contiki-doc/sys.txt: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup sys Contiki system 3 | @{ 4 | */ 5 | /** @} */ 6 | -------------------------------------------------------------------------------- /contiki/contiki-doc/tutorials.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * \defgroup tutorials Tutorials 3 | * @{ 4 | This module contains all Contiki related tutorials. 5 | 6 | */ 7 | /** @} */ 8 | -------------------------------------------------------------------------------- /contiki/core/contiki-lib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | */ 34 | #ifndef CONTIKI_LIB_H_ 35 | #define CONTIKI_LIB_H_ 36 | 37 | #include "contiki.h" 38 | #include "lib/list.h" 39 | #include "lib/memb.h" 40 | #include "lib/mmem.h" 41 | #include "lib/random.h" 42 | 43 | #endif /* CONTIKI_LIB_H_ */ 44 | -------------------------------------------------------------------------------- /contiki/core/contiki-version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | */ 34 | #ifndef __CONTIKI_VERSION__ 35 | #define __CONTIKI_VERSION__ 36 | 37 | #ifndef CONTIKI_VERSION_STRING 38 | #define CONTIKI_VERSION_STRING "Contiki 3.x" 39 | #endif /* CONTIKI_VERSION_STRING */ 40 | 41 | #endif /* __CONTIKI_VERSION__ */ 42 | -------------------------------------------------------------------------------- /contiki/core/ctk/ctk-textentry-checkbox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003, Adam Dunkels. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following 12 | * disclaimer in the documentation and/or other materials provided 13 | * with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote 15 | * products derived from this software without specific prior 16 | * written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 19 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 24 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * This file is part of the Contiki desktop environment 31 | * 32 | * 33 | */ 34 | #ifndef CTK_TEXTENTRY_CHECKBOX_H_ 35 | #define CTK_TEXTENTRY_CHECKBOX_H_ 36 | 37 | unsigned char ctk_textentry_checkbox_input(ctk_arch_key_t c, 38 | struct ctk_textentry *t); 39 | 40 | #endif /* CTK_TEXTENTRY_CHECKBOX_H_ */ 41 | -------------------------------------------------------------------------------- /contiki/core/ctk/ctk-textentry-cmdline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003, Adam Dunkels. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following 12 | * disclaimer in the documentation and/or other materials provided 13 | * with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote 15 | * products derived from this software without specific prior 16 | * written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 19 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 24 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * This file is part of the Contiki desktop environment 31 | * 32 | * 33 | */ 34 | #ifndef CTK_TEXTENTRY_CMDLINE_H_ 35 | #define CTK_TEXTENTRY_CMDLINE_H_ 36 | 37 | #include "ctk/ctk.h" 38 | 39 | unsigned char ctk_textentry_cmdline_input(ctk_arch_key_t c, 40 | struct ctk_textentry *t); 41 | 42 | #endif /* CTK_TEXTENTRY_CMDLINE_H_ */ 43 | -------------------------------------------------------------------------------- /contiki/core/ctk/ctk-textentry-multiline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003, Adam Dunkels. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following 12 | * disclaimer in the documentation and/or other materials provided 13 | * with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote 15 | * products derived from this software without specific prior 16 | * written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 19 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 24 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * This file is part of the Contiki desktop environment 31 | * 32 | * 33 | */ 34 | #ifndef CTK_TEXTENTRY_MULTILINE_H_ 35 | #define CTK_TEXTENTRY_MULTILINE_H_ 36 | 37 | unsigned char ctk_textentry_multiline_input(ctk_arch_key_t c, 38 | struct ctk_textentry *t); 39 | 40 | #endif /* CTK_TEXTENTRY_MULTILINE_H_ */ 41 | -------------------------------------------------------------------------------- /contiki/core/dev/button-sensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | #ifndef BUTTON_SENSOR_H_ 33 | #define BUTTON_SENSOR_H_ 34 | 35 | #include "lib/sensors.h" 36 | 37 | extern const struct sensors_sensor button_sensor; 38 | extern const struct sensors_sensor button_sensor2; 39 | 40 | #define BUTTON_SENSOR "Button" 41 | 42 | #endif /* BUTTON_SENSOR_H_ */ 43 | -------------------------------------------------------------------------------- /contiki/core/dev/nullradio.h: -------------------------------------------------------------------------------- 1 | #ifndef NULLRADIO_H 2 | #define NULLRADIO_H 3 | 4 | #include "dev/radio.h" 5 | 6 | extern const struct radio_driver nullradio_driver; 7 | 8 | #endif /* NULLRADIO_H */ 9 | -------------------------------------------------------------------------------- /contiki/core/dev/radio-sensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | #ifndef RADIO_SENSOR_H_ 33 | #define RADIO_SENSOR_H_ 34 | 35 | #include "lib/sensors.h" 36 | 37 | extern const struct sensors_sensor radio_sensor; 38 | 39 | #define RADIO_SENSOR_LAST_VALUE 0 40 | #define RADIO_SENSOR_LAST_PACKET 1 41 | 42 | #define RADIO_SENSOR "Radio" 43 | 44 | extern unsigned int radio_sensor_signal; 45 | 46 | #endif /* RADIO_SENSOR_H_ */ 47 | -------------------------------------------------------------------------------- /contiki/core/dev/rom.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #ifndef ROM_H 32 | #define ROM_H 33 | 34 | int rom_pread(void *buf, int nbytes, off_t offset); 35 | 36 | int rom_pwrite(const void *buf, int nbytes, off_t offset); 37 | 38 | int rom_erase(long nbytes, off_t offset); 39 | 40 | #endif /* ROM_H */ 41 | -------------------------------------------------------------------------------- /contiki/core/dev/watchdog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | #ifndef WATCHDOG_H_ 33 | #define WATCHDOG_H_ 34 | 35 | void watchdog_init(void); 36 | void watchdog_start(void); 37 | void watchdog_periodic(void); 38 | void watchdog_stop(void); 39 | 40 | void watchdog_reboot(void); 41 | 42 | #endif /* WATCHDOG_H_ */ 43 | -------------------------------------------------------------------------------- /contiki/core/dev/xmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #ifndef XMEM_H 32 | #define XMEM_H 33 | 34 | void xmem_init(void); 35 | 36 | int xmem_pread(void *buf, int nbytes, unsigned long offset); 37 | 38 | int xmem_pwrite(const void *buf, int nbytes, unsigned long offset); 39 | 40 | int xmem_erase(long nbytes, unsigned long offset); 41 | 42 | #endif /* XMEM_H */ 43 | -------------------------------------------------------------------------------- /contiki/core/lib/assert.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | void 34 | _xassert(const char *file, int lineno) 35 | { 36 | printf("Assertion failed: file %s, line %d.\n", file, lineno); 37 | /* 38 | * loop for a while; 39 | * call _reset_vector__(); 40 | */ 41 | } 42 | -------------------------------------------------------------------------------- /contiki/core/lib/me_tabs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | #ifndef ME_TABS_H_ 33 | #define ME_TABS_H_ 34 | 35 | extern const unsigned short me_encode_tab[256]; 36 | extern const unsigned char me_decode_tab[256]; 37 | extern const unsigned char me_valid_tab[256]; 38 | 39 | #endif /* ME_TABS_H_ */ 40 | 41 | -------------------------------------------------------------------------------- /contiki/core/lib/mmem.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/core/lib/mmem.h -------------------------------------------------------------------------------- /contiki/core/lib/print-stats.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | 33 | /** 34 | * \file 35 | * Convenience function for printing system statistics 36 | * \author 37 | * Adam Dunkels 38 | */ 39 | 40 | #ifndef PRINT_STATS_H_ 41 | #define PRINT_STATS_H_ 42 | 43 | void print_stats(void); 44 | 45 | #endif /* PRINT_STATS_H_ */ 46 | -------------------------------------------------------------------------------- /contiki/core/loader/dlloader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | #ifndef DLLOADER_H_ 33 | #define DLLOADER_H_ 34 | 35 | int dlloader_load(char *name, char *arg); 36 | 37 | #endif /* SOLOADR_H_ */ 38 | -------------------------------------------------------------------------------- /contiki/core/loader/symbols-def.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | #ifndef SYMBOLS_DEF_H_ 33 | #define SYMBOLS_DEF_H_ 34 | 35 | struct symbols { 36 | const char *name; 37 | void *value; 38 | }; 39 | 40 | extern const int symbols_nelts; 41 | 42 | extern const struct symbols symbols[/* symbols_nelts */]; 43 | 44 | #endif /* SYMBOLS_DEF_H_ */ 45 | -------------------------------------------------------------------------------- /contiki/core/loader/symbols.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | #ifndef SYMBOLS_H_ 33 | #define SYMBOLS_H_ 34 | 35 | struct symbols { 36 | const char *name; 37 | void *value; 38 | }; 39 | 40 | extern const int symbols_nelts; 41 | 42 | extern const struct symbols symbols[/* symbols_nelts */]; 43 | 44 | #endif /* SYMBOLS_H_ */ 45 | -------------------------------------------------------------------------------- /contiki/core/loader/symtab.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | #ifndef SYMTAB_H_ 33 | #define SYMTAB_H_ 34 | 35 | void *symtab_lookup(const char *name); 36 | 37 | #endif /* SYMTAB_H_ */ 38 | -------------------------------------------------------------------------------- /contiki/core/net/ip/uip-packetqueue.h: -------------------------------------------------------------------------------- 1 | #ifndef UIP_PACKETQUEUE_H 2 | #define UIP_PACKETQUEUE_H 3 | 4 | #include "sys/ctimer.h" 5 | 6 | struct uip_packetqueue_handle; 7 | 8 | struct uip_packetqueue_packet { 9 | struct uip_ds6_queued_packet *next; 10 | uint8_t queue_buf[UIP_BUFSIZE - UIP_LLH_LEN]; 11 | uint16_t queue_buf_len; 12 | struct ctimer lifetimer; 13 | struct uip_packetqueue_handle *handle; 14 | }; 15 | 16 | struct uip_packetqueue_handle { 17 | struct uip_packetqueue_packet *packet; 18 | }; 19 | 20 | void uip_packetqueue_new(struct uip_packetqueue_handle *handle); 21 | 22 | 23 | struct uip_packetqueue_packet * 24 | uip_packetqueue_alloc(struct uip_packetqueue_handle *handle, clock_time_t lifetime); 25 | 26 | 27 | void 28 | uip_packetqueue_free(struct uip_packetqueue_handle *handle); 29 | 30 | uint8_t *uip_packetqueue_buf(struct uip_packetqueue_handle *h); 31 | uint16_t uip_packetqueue_buflen(struct uip_packetqueue_handle *h); 32 | void uip_packetqueue_set_buflen(struct uip_packetqueue_handle *h, uint16_t len); 33 | 34 | 35 | #endif /* UIP_PACKETQUEUE_H */ 36 | -------------------------------------------------------------------------------- /contiki/core/net/ip64/README.md: -------------------------------------------------------------------------------- 1 | The `ip64` module lets an IPv6 Contiki network be connected to an IPv4 2 | network without any additional configuration or outside software. The 3 | `ip64` module runs on the RPL root node and translates outgoing IPv6 4 | packets into IPv4 packets nd incoming IPv4 packets to IPv6 packets. 5 | 6 | The `ip64` module uses stateful NAT64 (RFC6164) to do the packet 7 | translation and DNS64 (RFC6147) to catch DNS requests for IPv6 8 | addresses, turn them into requests for IPv4 addresses, and turn the 9 | replies into responses for IPv6 addresses. This allows devices on the 10 | inside IPv6 network to connect to named servers on the outside IPv4 11 | network. 12 | 13 | The `ip64` module hooks into the IPv6 stack via a fallback 14 | interface. Any packet that can not be routed into the local RPL mesh 15 | will be sent over the fallback interface, where `ip64` picks it up, 16 | translates it into an IPv4 packet, and sends it over its outgoing 17 | interface. 18 | 19 | In addition to providing NAT64 and DNS64 services, the `ip64` module 20 | also performs DHCPv4 to request IPv4 address for devices connected to 21 | a medium such as Ethernet. The `ip64` module also performs ARP 22 | processing to communicate over the Ethernet. 23 | 24 | The `ip64` module uses a configuration file called `ip64-conf.h` that 25 | specifies what device to use for the IPv4 network. This file is 26 | intended to be placed in the platform directory. An example 27 | configuration file called `ip64-conf-example.h` is provided in this 28 | directory. 29 | 30 | -------------------------------------------------------------------------------- /contiki/core/net/ip64/ip64-dns64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Thingsquare, http://www.thingsquare.com/. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holder nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 20 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 21 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 28 | * OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | */ 31 | 32 | #ifndef IP64_DNS64_H_ 33 | #define IP64_DNS64_H_ 34 | 35 | void ip64_dns64_6to4(const uint8_t *ipv6data, int ipv6datalen, 36 | uint8_t *ipv4data, int ipv4datalen); 37 | int ip64_dns64_4to6(const uint8_t *ipv4data, int ipv4datalen, 38 | uint8_t *ipv6data, int ipv6datalen); 39 | 40 | #endif /* IP64_DNS64_H_ */ 41 | -------------------------------------------------------------------------------- /contiki/core/net/ip64/ip64-driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Thingsquare, http://www.thingsquare.com/. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * 3. Neither the name of the copyright holder nor the names of its 15 | * contributors may be used to endorse or promote products derived 16 | * from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 27 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 29 | * OF THE POSSIBILITY OF SUCH DAMAGE. 30 | * 31 | */ 32 | #ifndef IP64_DRIVER_H 33 | #define IP64_DRIVER_H 34 | 35 | struct ip64_driver { 36 | void (* init)(void); 37 | int (* output)(uint8_t *packet, uint16_t packet_len); 38 | }; 39 | 40 | 41 | #endif /* IP64_DRIVER_H */ 42 | -------------------------------------------------------------------------------- /contiki/core/net/ip64/ip64-eth-interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Thingsquare, http://www.thingsquare.com/. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * 3. Neither the name of the copyright holder nor the names of its 15 | * contributors may be used to endorse or promote products derived 16 | * from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 27 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 29 | * OF THE POSSIBILITY OF SUCH DAMAGE. 30 | * 31 | */ 32 | #ifndef IP64_ETH_INTERFACE_H 33 | #define IP64_ETH_INTERFACE_H 34 | 35 | #include "net/ip/uip.h" 36 | 37 | void ip64_eth_interface_input(uint8_t *packet, uint16_t len); 38 | 39 | extern const struct uip_fallback_interface ip64_eth_interface; 40 | 41 | #endif /* IP64_ETH_INTERFACE_H */ 42 | -------------------------------------------------------------------------------- /contiki/core/net/ip64/ip64-eth.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Thingsquare, http://www.thingsquare.com/. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * 3. Neither the name of the copyright holder nor the names of its 15 | * contributors may be used to endorse or promote products derived 16 | * from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 27 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 29 | * OF THE POSSIBILITY OF SUCH DAMAGE. 30 | * 31 | */ 32 | #include "ip64-eth.h" 33 | 34 | #include 35 | 36 | struct ip64_eth_addr ip64_eth_addr; 37 | 38 | /*---------------------------------------------------------------------------*/ 39 | void 40 | ip64_eth_addr_set(struct ip64_eth_addr *addr) 41 | { 42 | memcpy(&ip64_eth_addr, addr, sizeof(struct ip64_eth_addr)); 43 | } 44 | /*---------------------------------------------------------------------------*/ 45 | -------------------------------------------------------------------------------- /contiki/core/net/ip64/ip64-interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Thingsquare, http://www.thingsquare.com/. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * 3. Neither the name of the copyright holder nor the names of its 15 | * contributors may be used to endorse or promote products derived 16 | * from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 27 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 29 | * OF THE POSSIBILITY OF SUCH DAMAGE. 30 | * 31 | */ 32 | #ifndef IP64_INTERFACE_H 33 | #define IP64_INTERFACE_H 34 | 35 | struct ip64_interface { 36 | void (* init)(void); 37 | int (* input)(uint8_t *packet, uint16_t packet_len); 38 | int (* output)(uint8_t *packet, uint16_t packet_len); 39 | }; 40 | 41 | 42 | #endif /* IP64_INTERFACE_H */ 43 | -------------------------------------------------------------------------------- /contiki/core/net/ip64/ip64-ipv4-dhcp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Thingsquare, http://www.thingsquare.com/. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * 3. Neither the name of the copyright holder nor the names of its 15 | * contributors may be used to endorse or promote products derived 16 | * from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 27 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 29 | * OF THE POSSIBILITY OF SUCH DAMAGE. 30 | * 31 | */ 32 | #ifndef IP64_IPV4_DHCP_H 33 | #define IP64_IPV4_DHCP_H 34 | 35 | void ip64_ipv4_dhcp_init(void); 36 | 37 | #endif /* IP64_IPV4_DHCP_H */ 38 | -------------------------------------------------------------------------------- /contiki/core/net/ip64/ip64-null-driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Thingsquare, http://www.thingsquare.com/. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * 3. Neither the name of the copyright holder nor the names of its 15 | * contributors may be used to endorse or promote products derived 16 | * from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 27 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 29 | * OF THE POSSIBILITY OF SUCH DAMAGE. 30 | * 31 | */ 32 | #ifndef IP64_NULL_DRIVER_H 33 | #define IP64_NULL_DRIVER_H 34 | 35 | #include "ip64-driver.h" 36 | 37 | extern const struct ip64_driver ip64_null_driver; 38 | 39 | #endif /* IP64_NULL_DRIVER_H */ 40 | -------------------------------------------------------------------------------- /contiki/core/net/ip64/ip64-slip-interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Thingsquare, http://www.thingsquare.com/. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * 3. Neither the name of the copyright holder nor the names of its 15 | * contributors may be used to endorse or promote products derived 16 | * from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 27 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 29 | * OF THE POSSIBILITY OF SUCH DAMAGE. 30 | * 31 | */ 32 | #ifndef IP64_SLIP_INTERFACE_H 33 | #define IP64_SLIP_INTERFACE_H 34 | 35 | void ip64_slip_interface_input(uint8_t *packet, uint16_t len); 36 | 37 | extern const struct uip_fallback_interface ip64_slip_interface; 38 | 39 | #endif /* IP64_SLIP_INTERFACE_H */ 40 | -------------------------------------------------------------------------------- /contiki/core/net/ipv4/uip-fw-drv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | */ 34 | #ifndef UIP_FW_DRV_H_ 35 | #define UIP_FW_DRV_H_ 36 | 37 | #include "contiki.h" 38 | #include "net/ipv4/uip-fw.h" 39 | 40 | PROCESS_NAME(uip_fw_process); 41 | 42 | #endif /* UIP_FW_DRV_H_ */ 43 | -------------------------------------------------------------------------------- /contiki/core/net/mac/contikimac/contikimac-framer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | 33 | /** 34 | * \file 35 | * Creates and parses the ContikiMAC header. 36 | * \author 37 | * Konrad Krentz 38 | */ 39 | 40 | #ifndef CONTIKIMAC_FRAMER_H_ 41 | #define CONTIKIMAC_FRAMER_H_ 42 | 43 | #include "net/mac/framer.h" 44 | 45 | extern const struct framer contikimac_framer; 46 | 47 | #endif /* CONTIKIMAC_FRAMER_H_ */ 48 | -------------------------------------------------------------------------------- /contiki/core/net/mac/framer-802154.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | /** 32 | * \file 33 | * A MAC framer for IEEE 802.15.4 34 | * \author 35 | * Niclas Finne 36 | * Joakim Eriksson 37 | */ 38 | 39 | #ifndef FRAMER_802154_H_ 40 | #define FRAMER_802154_H_ 41 | 42 | #include "net/mac/framer.h" 43 | 44 | extern const struct framer framer_802154; 45 | 46 | #endif /* FRAMER_802154_H_ */ 47 | -------------------------------------------------------------------------------- /contiki/core/net/mac/framer-nullmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | /** 32 | * \file 33 | * MAC framer for nullmac 34 | * \author 35 | * Niclas Finne 36 | * Joakim Eriksson 37 | */ 38 | 39 | #ifndef FRAMER_NULLMAC_H_ 40 | #define FRAMER_NULLMAC_H_ 41 | 42 | #include "net/mac/framer.h" 43 | 44 | extern const struct framer framer_nullmac; 45 | 46 | #endif /* FRAMER_NULLMAC_H_ */ 47 | -------------------------------------------------------------------------------- /contiki/core/net/mac/nullmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | 33 | /** 34 | * \file 35 | * A MAC protocol implementation that does not do anything. 36 | * \author 37 | * Adam Dunkels 38 | */ 39 | 40 | #ifndef NULLMAC_H_ 41 | #define NULLMAC_H_ 42 | 43 | #include "net/mac/mac.h" 44 | #include "dev/radio.h" 45 | 46 | extern const struct mac_driver nullmac_driver; 47 | 48 | 49 | #endif /* NULLMAC_H_ */ 50 | -------------------------------------------------------------------------------- /contiki/core/net/mac/nullrdc-noframer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | 33 | /** 34 | * \file 35 | * A MAC protocol implementation that does not do anything. 36 | * \author 37 | * Adam Dunkels 38 | */ 39 | 40 | #ifndef NULLRDC_NOFRAMER_H_ 41 | #define NULLRDC_NOFRAMER_H_ 42 | 43 | #include "net/mac/rdc.h" 44 | #include "dev/radio.h" 45 | 46 | extern const struct rdc_driver nullrdc_noframer_driver; 47 | 48 | #endif /* NULLRDC_NOFRAMER_H_ */ 49 | -------------------------------------------------------------------------------- /contiki/core/net/mac/nullrdc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | 33 | /** 34 | * \file 35 | * A null RDC implementation that uses framer for headers. 36 | * \author 37 | * Adam Dunkels 38 | * Niclas Finne 39 | */ 40 | 41 | #ifndef NULLRDC_H_ 42 | #define NULLRDC_H_ 43 | 44 | #include "net/mac/rdc.h" 45 | 46 | extern const struct rdc_driver nullrdc_driver; 47 | 48 | #endif /* NULLRDC_H_ */ 49 | -------------------------------------------------------------------------------- /contiki/core/net/mac/tsch/Makefile.tsch: -------------------------------------------------------------------------------- 1 | CONTIKI_SOURCEFILES += tsch.c tsch-slot-operation.c tsch-queue.c tsch-packet.c tsch-schedule.c tsch-log.c tsch-rpl.c tsch-adaptive-timesync.c 2 | -------------------------------------------------------------------------------- /contiki/core/net/rime/chameleon-bitopt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | 33 | /** 34 | * \file 35 | * A Chameleon module that produces bit-optimized headers 36 | * \author 37 | * Adam Dunkels 38 | */ 39 | 40 | #ifndef CHAMELEON_BITOPT_H_ 41 | #define CHAMELEON_BITOPT_H_ 42 | 43 | #include "sys/cc.h" 44 | 45 | extern CC_CONST_FUNCTION struct chameleon_module chameleon_bitopt; 46 | 47 | #endif /* CHAMELEON_BITOPT_H_ */ 48 | -------------------------------------------------------------------------------- /contiki/core/net/rime/chameleon-raw.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | 33 | /** 34 | * \file 35 | * A Chameleon module that produces non-optimized headers 36 | * \author 37 | * Adam Dunkels 38 | */ 39 | 40 | #ifndef CHAMELEON_RAW_H_ 41 | #define CHAMELEON_RAW_H_ 42 | 43 | #include "sys/cc.h" 44 | 45 | extern CC_CONST_FUNCTION struct chameleon_module chameleon_raw; 46 | 47 | #endif /* CHAMELEON_RAW_H_ */ 48 | -------------------------------------------------------------------------------- /contiki/core/net/rime/rimestats.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | 33 | /** 34 | * \file 35 | * A brief description of what this file is. 36 | * \author 37 | * Adam Dunkels 38 | */ 39 | 40 | #include "net/rime/rimestats.h" 41 | /*---------------------------------------------------------------------------*/ 42 | 43 | struct rimestats rimestats; 44 | 45 | /*---------------------------------------------------------------------------*/ 46 | -------------------------------------------------------------------------------- /contiki/core/net/rpl/rpl-dag-root.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Thingsquare, http://www.thingsquare.com/. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holder nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 20 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 21 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 28 | * OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | */ 31 | 32 | #ifndef RPL_DAG_ROOT_H_ 33 | #define RPL_DAG_ROOT_H_ 34 | 35 | void rpl_dag_root_init(void); 36 | void rpl_dag_root_init_dag(void); 37 | int rpl_dag_root_init_dag_immediately(void); 38 | 39 | int rpl_dag_root_is_root(void); 40 | 41 | #endif /* RPL_DAG_ROOT_H_ */ 42 | -------------------------------------------------------------------------------- /contiki/core/sys/arg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003, Adam Dunkels. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following 12 | * disclaimer in the documentation and/or other materials provided 13 | * with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote 15 | * products derived from this software without specific prior 16 | * written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 19 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 24 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * This file is part of the Contiki desktop OS 31 | * 32 | * 33 | */ 34 | #ifndef ARG_H_ 35 | #define ARG_H_ 36 | 37 | void arg_init(void); 38 | 39 | char *arg_alloc(char size); 40 | void arg_free(char *arg); 41 | 42 | #endif /* ARG_H_ */ 43 | -------------------------------------------------------------------------------- /contiki/core/sys/cc-gcc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Scanimetrics - http://www.scanimetrics.com 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holder nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 20 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 21 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 28 | * OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | /*---------------------------------------------------------------------------*/ 31 | #ifndef _CC_GCC_H_ 32 | #define _CC_GCC_H_ 33 | #ifdef __GNUC__ 34 | 35 | #ifndef CC_CONF_INLINE 36 | /* use __inline__ in case "inline" is not available for any reason */ 37 | #define CC_CONF_INLINE __inline__ 38 | #endif 39 | 40 | #define CC_CONF_ALIGN(n) __attribute__((__aligned__(n))) 41 | 42 | #endif /* __GNUC__ */ 43 | #endif /* _CC_GCC_H_ */ 44 | -------------------------------------------------------------------------------- /contiki/core/sys/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | */ 34 | #ifndef LOG_H_ 35 | #define LOG_H_ 36 | 37 | #include "contiki-conf.h" 38 | 39 | #if LOG_CONF_ENABLED 40 | void log_message(const char *part1, const char *part2); 41 | #else /* LOG_CONF_ENABLED */ 42 | #define log_message(p1, p2) 43 | #endif /* LOG_CONF_ENABLED */ 44 | 45 | #endif /* LOG_H_ */ 46 | -------------------------------------------------------------------------------- /contiki/core/sys/node-id.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | */ 34 | 35 | #ifndef NODE_ID_H_ 36 | #define NODE_ID_H_ 37 | 38 | void node_id_restore(void); 39 | void node_id_burn(unsigned short node_id); 40 | 41 | extern unsigned short node_id; 42 | 43 | #endif /* NODE_ID_H_ */ 44 | -------------------------------------------------------------------------------- /contiki/core/sys/procinit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | #ifndef PROCINIT_H_ 33 | #define PROCINIT_H_ 34 | 35 | #include "sys/process.h" 36 | 37 | #if ! CC_NO_VA_ARGS 38 | #define PROCINIT(...) \ 39 | const struct process *procinit[] = {__VA_ARGS__, NULL} 40 | #endif 41 | 42 | void procinit_init(void); 43 | 44 | #endif /* PROCINIT_H_ */ 45 | -------------------------------------------------------------------------------- /contiki/cpu/arm/aducrf101/Common/defs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Analog Devices, Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted (subject to the limitations in the 6 | * disclaimer below) provided that the following conditions are met: 7 | * 8 | * - Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * - Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * - Neither the name of Analog Devices, Inc. nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 21 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 22 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 29 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 30 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 31 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 32 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | /** 35 | @file defs.h 36 | @brief Global definitions. 37 | @version V0.1 38 | @author PAD CSE group, Analog Devices Inc 39 | @date January 2012 40 | **/ 41 | 42 | typedef enum {FALSE = 0, TRUE = !FALSE} boolean; 43 | -------------------------------------------------------------------------------- /contiki/cpu/arm/aducrf101/dev/uart.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Analog Devices, Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted (subject to the limitations in the 6 | * disclaimer below) provided that the following conditions are met: 7 | * 8 | * - Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * - Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * - Neither the name of Analog Devices, Inc. nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 21 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 22 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 29 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 30 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 31 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 32 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | /** 35 | * \author Jim Paris 36 | */ 37 | 38 | #ifndef UART_H 39 | #define UART_H 40 | 41 | void uart_init(int baud); 42 | void uart_put(unsigned char x); 43 | void uart_set_input(int (*input)(unsigned char c)); 44 | 45 | void uart_enable_stdout(int enabled); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /contiki/cpu/arm/aducrf101/mtarch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Analog Devices, Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted (subject to the limitations in the 6 | * disclaimer below) provided that the following conditions are met: 7 | * 8 | * - Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * - Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * - Neither the name of Analog Devices, Inc. nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 21 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 22 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 29 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 30 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 31 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 32 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | /** 35 | * \author Jim Paris 36 | */ 37 | 38 | #ifndef MTARCH_H_ 39 | #define MTARCH_H_ 40 | 41 | /* Multithreading is currently unimplemented for ARM Cortex-M3 */ 42 | 43 | struct mtarch_thread { 44 | short mt_thread; 45 | }; 46 | 47 | #endif /* MTARCH_H_ */ 48 | -------------------------------------------------------------------------------- /contiki/cpu/arm/aducrf101/rtimer-arch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Analog Devices, Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted (subject to the limitations in the 6 | * disclaimer below) provided that the following conditions are met: 7 | * 8 | * - Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * - Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * - Neither the name of Analog Devices, Inc. nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 21 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 22 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 29 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 30 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 31 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 32 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | /** 35 | * \author Jim Paris 36 | */ 37 | 38 | #ifndef __RTIMER_ARCH_H__ 39 | #define __RTIMER_ARCH_H__ 40 | 41 | #include 42 | 43 | #define RTIMER_ARCH_SECOND (32768) 44 | 45 | #include "sys/rtimer.h" 46 | 47 | #endif /* __RTIMER_ARCH_H__ */ 48 | -------------------------------------------------------------------------------- /contiki/cpu/arm/arm.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * @defgroup cmsis CMSIS (Cortex Microcontroller Software Interface Standard) 3 | * @ingroup arm 4 | */ 5 | 6 | /** 7 | * @defgroup aducrf101 ADUCRF101 8 | * @ingroup arm 9 | */ 10 | 11 | /** 12 | * @defgroup at91sam7s AT91SAM7S 13 | * @ingroup arm 14 | */ 15 | 16 | /** 17 | * @defgroup stm32f103 STM32F103 18 | * @ingroup arm 19 | */ 20 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/AT91SAM7S128-ROM.ld: -------------------------------------------------------------------------------- 1 | /* Memory Definitions */ 2 | 3 | MEMORY 4 | { 5 | CODE (rx) : ORIGIN = 0x00100000, LENGTH = 128K 6 | DATA (rw) : ORIGIN = 0x00200000, LENGTH = 32K 7 | } 8 | 9 | INCLUDE AT91SAM7S-ROM.ld 10 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/AT91SAM7S64-ROM.ld: -------------------------------------------------------------------------------- 1 | /* Memory Definitions */ 2 | 3 | MEMORY 4 | { 5 | CODE (rx) : ORIGIN = 0x00100000, LENGTH = 64K 6 | DATA (rw) : ORIGIN = 0x00200000, LENGTH = 16K 7 | } 8 | INCLUDE AT91SAM7S-ROM.ld 9 | 10 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/builtins.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | builtin["_exit"] = "void _exit()"; 3 | builtin["strlen"] = "unsigned long strlen()"; 4 | } 5 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/clock.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | #define PIV ((MCK/CLOCK_SECOND/16)-1) 10 | 11 | static volatile clock_time_t current_clock = 0; 12 | static volatile unsigned long current_seconds = 0; 13 | static unsigned int second_countdown = CLOCK_SECOND; 14 | 15 | 16 | static int pit_handler_func() 17 | { 18 | if (!(*AT91C_PITC_PISR & AT91C_PITC_PITS)) return 0; /* Check PIT 19 | Interrupt */ 20 | current_clock++; 21 | if(etimer_pending() && etimer_next_expiration_time() <= current_clock) { 22 | etimer_request_poll(); 23 | /* dbg_printf("%d,%d\n", clock_time(),etimer_next_expiration_time ()); */ 24 | 25 | } 26 | if (--second_countdown == 0) { 27 | current_seconds++; 28 | second_countdown = CLOCK_SECOND; 29 | } 30 | (void)*AT91C_PITC_PIVR; 31 | return 1; 32 | } 33 | 34 | static SystemInterruptHandler pit_handler = {NULL, pit_handler_func}; 35 | 36 | void 37 | clock_init() 38 | { 39 | sys_interrupt_append_handler(&pit_handler); 40 | *AT91C_PITC_PIMR = (AT91C_PITC_PITIEN | /* PIT Interrupt Enable */ 41 | AT91C_PITC_PITEN | /* PIT Enable */ 42 | PIV); 43 | sys_interrupt_enable(); 44 | } 45 | 46 | clock_time_t 47 | clock_time(void) 48 | { 49 | return current_clock; 50 | } 51 | 52 | /* The inner loop takes 4 cycles. The outer 5+SPIN_COUNT*4. */ 53 | 54 | #define SPIN_TIME 2 /* us */ 55 | #define SPIN_COUNT (((MCK*SPIN_TIME/1000000)-5)/4) 56 | 57 | #ifndef __MAKING_DEPS__ 58 | 59 | void 60 | clock_delay(unsigned int t) 61 | { 62 | #ifdef __THUMBEL__ 63 | asm volatile("1: mov r1,%2\n2:\tsub r1,#1\n\tbne 2b\n\tsub %0,#1\n\tbne 1b\n":"=l"(t):"0"(t),"l"(SPIN_COUNT)); 64 | #else 65 | #error Must be compiled in thumb mode 66 | #endif 67 | } 68 | 69 | unsigned long 70 | clock_seconds(void) 71 | { 72 | return current_seconds; 73 | } 74 | #endif /* __MAKING_DEPS__ */ 75 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/debug-uart.h: -------------------------------------------------------------------------------- 1 | #ifndef DEBUG_UART_H_1V2039076V__ 2 | #define DEBUG_UART_H_1V2039076V__ 3 | 4 | 5 | void 6 | dbg_setup_uart(); 7 | 8 | void 9 | dbg_set_input_handler(void (*handler)(const char *inp, unsigned int len)); 10 | 11 | unsigned int 12 | dbg_send_bytes(const unsigned char *seq, unsigned int len); 13 | 14 | #if 0 15 | void 16 | dbg_printf(const char *format, ...) 17 | __attribute__ ((__format__ (__printf__, 1,2))); 18 | 19 | void 20 | dbg_blocking_printf(const char *format, ...) 21 | __attribute__ ((__format__ (__printf__, 1,2))); 22 | #endif 23 | 24 | void 25 | dbg_putchar(const char ch); 26 | 27 | void 28 | dbg_blocking_putchar(const char ch); 29 | 30 | void 31 | dbg_drain(); 32 | 33 | #endif /* DEBUG_UART_H_1V2039076V__ */ 34 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/interrupt-utils.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * $RCSfile: interrupt-utils.c,v $ 4 | * $Revision: 1.2 $ 5 | * 6 | * This module provides the interface routines for setting up and 7 | * controlling the various interrupt modes present on the ARM processor. 8 | * Copyright 2004, R O SoftWare 9 | * No guarantees, warrantees, or promises, implied or otherwise. 10 | * May be used for hobby or commercial purposes provided copyright 11 | * notice remains intact. 12 | * 13 | *****************************************************************************/ 14 | #include "interrupt-utils.h" 15 | 16 | #define IRQ_MASK 0x00000080 17 | #define FIQ_MASK 0x00000040 18 | #define INT_MASK (IRQ_MASK | FIQ_MASK) 19 | 20 | static inline unsigned __get_cpsr(void) 21 | { 22 | unsigned long retval; 23 | asm volatile (" mrs %0, cpsr" : "=r" (retval) : /* no inputs */ ); 24 | return retval; 25 | } 26 | 27 | static inline void __set_cpsr(unsigned val) 28 | { 29 | asm volatile (" msr cpsr_c, %0" : /* no outputs */ : "r" (val) ); 30 | } 31 | 32 | unsigned disableIRQ(void) 33 | { 34 | unsigned _cpsr; 35 | 36 | _cpsr = __get_cpsr(); 37 | __set_cpsr(_cpsr | IRQ_MASK); 38 | return _cpsr; 39 | } 40 | 41 | unsigned restoreIRQ(unsigned oldCPSR) 42 | { 43 | unsigned _cpsr; 44 | 45 | _cpsr = __get_cpsr(); 46 | __set_cpsr((_cpsr & ~IRQ_MASK) | (oldCPSR & IRQ_MASK)); 47 | return _cpsr; 48 | } 49 | 50 | unsigned enableIRQ(void) 51 | { 52 | unsigned _cpsr; 53 | 54 | _cpsr = __get_cpsr(); 55 | __set_cpsr(_cpsr & ~IRQ_MASK); 56 | return _cpsr; 57 | } 58 | 59 | unsigned disableFIQ(void) 60 | { 61 | unsigned _cpsr; 62 | 63 | _cpsr = __get_cpsr(); 64 | __set_cpsr(_cpsr | FIQ_MASK); 65 | return _cpsr; 66 | } 67 | 68 | unsigned restoreFIQ(unsigned oldCPSR) 69 | { 70 | unsigned _cpsr; 71 | 72 | _cpsr = __get_cpsr(); 73 | __set_cpsr((_cpsr & ~FIQ_MASK) | (oldCPSR & FIQ_MASK)); 74 | return _cpsr; 75 | } 76 | 77 | unsigned enableFIQ(void) 78 | { 79 | unsigned _cpsr; 80 | 81 | _cpsr = __get_cpsr(); 82 | __set_cpsr(_cpsr & ~FIQ_MASK); 83 | return _cpsr; 84 | } 85 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/io.h: -------------------------------------------------------------------------------- 1 | #ifndef IO_H_7UTLUP9AG6__ 2 | #define IO_H_7UTLUP9AG6__ 3 | 4 | #include 5 | 6 | 7 | #ifndef BV 8 | #define BV(x) (1<<(x)) 9 | #endif 10 | 11 | int splhigh(void); 12 | 13 | void splx(int saved); 14 | 15 | #endif /* IO_H_7UTLUP9AG6__ */ 16 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/loader/empty-symbols.c: -------------------------------------------------------------------------------- 1 | #include "symbols.h" 2 | const int symbols_nelts = 0; 3 | const struct symbols symbols[] = {{0,0}}; 4 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/loader/ram-segments.h: -------------------------------------------------------------------------------- 1 | #ifndef RAM_SEGMENTS_H_8EDB9N09UD__ 2 | #define RAM_SEGMENTS_H_8EDB9N09UD__ 3 | 4 | PROCESS_NAME(ram_segments_cleanup_process); 5 | 6 | #endif /* RAM_SEGMENTS_H_8EDB9N09UD__ */ 7 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/merge-rodata.ld: -------------------------------------------------------------------------------- 1 | SECTIONS 2 | { 3 | .text : 4 | { 5 | *(.text) 6 | *(.rodata.* .rodata) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/openocd/AT91SAM7x_init.script: -------------------------------------------------------------------------------- 1 | arm7_9 force_hw_bkpts enable 2 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/openocd/arm7_wig.cfg: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Change the default telnet port... 4 | telnet_port 4444 5 | # GDB connects here 6 | gdb_port 3333 7 | # GDB can also flash my flash! 8 | gdb_memory_map enable 9 | gdb_flash_program enable 10 | 11 | # Wiggler interface 12 | interface parport 13 | parport_port 0 14 | parport_cable wiggler 15 | jtag_speed 0 16 | set CPUTAPID 0x3f0f0f0f 17 | source [find target/sam7s.cfg] 18 | 19 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/openocd/arm7_wig_flash.cfg: -------------------------------------------------------------------------------- 1 | #daemon configuration 2 | telnet_port 4444 3 | gdb_port 3333 4 | 5 | #interface 6 | interface parport 7 | parport_port 0 8 | parport_cable wiggler 9 | jtag_speed 0 10 | #use combined on interfaces or targets that can't set TRST/SRST separately 11 | reset_config srst_only 12 | 13 | #jtag scan chain 14 | #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE) 15 | jtag_device 4 0x1 0xf 0xe 16 | 17 | #target configuration 18 | daemon_startup reset 19 | #target 20 | #target arm7tdmi 21 | target arm7tdmi little run_and_init 0 arm7tdmi_r4 22 | #target_script 0 reset h2294_init.script 23 | target_script 0 reset openocd_flash 24 | run_and_halt_time 0 30 25 | working_area 0 0x40000000 0x4000 nobackup 26 | 27 | #flash configuration 28 | #flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum 29 | #flash bank cfi 0x80000000 0x400000 2 2 0 30 | flash bank at91sam7 0 0 0 0 0 31 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/openocd/arm7_wig_reset.cfg: -------------------------------------------------------------------------------- 1 | #daemon configuration 2 | telnet_port 4444 3 | gdb_port 3333 4 | 5 | #interface 6 | interface parport 7 | parport_port 0 8 | parport_cable wiggler 9 | jtag_speed 0 10 | #use combined on interfaces or targets that can't set TRST/SRST separately 11 | reset_config srst_only 12 | 13 | #jtag scan chain 14 | #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE) 15 | jtag_device 4 0x1 0xf 0xe 16 | 17 | #target configuration 18 | daemon_startup reset 19 | #target 20 | #target arm7tdmi 21 | target arm7tdmi little run_and_init 0 arm7tdmi_r4 22 | #target_script 0 reset h2294_init.script 23 | target_script 0 reset openocd_reset 24 | run_and_halt_time 0 30 25 | working_area 0 0x40000000 0x4000 nobackup 26 | 27 | #flash configuration 28 | #flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum 29 | #flash bank cfi 0x80000000 0x400000 2 2 0 30 | flash bank at91sam7 0 0 0 0 0 31 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/openocd/openocd_flash: -------------------------------------------------------------------------------- 1 | poll 2 | mww 0xffffff64 0x5a000004 3 | sleep 250 4 | mww 0xffffff64 0x5a002004 5 | sleep 250 6 | flash probe 0 7 | flash write 0 /tmp/openocd_write.bin 0x0 8 | reset run 9 | sleep 500 10 | shutdown 11 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/openocd/openocd_reset: -------------------------------------------------------------------------------- 1 | poll 2 | reset run 3 | sleep 500 4 | shutdown 5 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/openocd/target/sam7s.cfg: -------------------------------------------------------------------------------- 1 | # ATMEL sam7s 2 | 3 | if { [info exists CHIPNAME] } { 4 | set _CHIPNAME $CHIPNAME 5 | } else { 6 | set _CHIPNAME sam7s 7 | } 8 | 9 | if { [info exists ENDIAN] } { 10 | set _ENDIAN $ENDIAN 11 | } else { 12 | set _ENDIAN little 13 | } 14 | 15 | if { [info exists CPUTAPID ] } { 16 | set _CPUTAPID $CPUTAPID 17 | } else { 18 | # force an error till we get a good number 19 | set _CPUTAPID 0xffffffff 20 | } 21 | 22 | #use combined on interfaces or targets that can't set TRST/SRST separately 23 | reset_config srst_only 24 | 25 | #jtag scan chain 26 | jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID 27 | 28 | # The target 29 | set _TARGETNAME [format "%s.cpu" $_CHIPNAME] 30 | target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi 31 | 32 | $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0 33 | 34 | flash bank at91sam7 0 0 0 0 0 35 | 36 | 37 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/pit-interrupt.h: -------------------------------------------------------------------------------- 1 | volatile unsigned int pit_count = 0; 2 | 3 | static void NACKEDFUNC ATTR system_int (void) { /* System Interrupt Handler */ 4 | 5 | ISR_ENTRY(); 6 | 7 | if (*AT91C_PITC_PISR & AT91C_PITC_PITS) { /* Check PIT Interrupt */ 8 | pit_count++; 9 | /* 10 | if ((pit_count % 100) == 0) { 11 | unsigned int led_state = (pit_count % 300) / 100; 12 | *AT91C_PIOA_ODSR = ~(1< 4 | #include 5 | 6 | #define DEBUG 1 7 | #if DEBUG 8 | #include 9 | #define PRINTF(...) printf(__VA_ARGS__) 10 | #else 11 | #define PRINTF(...) 12 | #endif 13 | 14 | /* Here we have a proper stack frame and can use local variables */ 15 | static void rtimer_int_safe() __attribute((noinline)); 16 | static void 17 | rtimer_int_safe() 18 | { 19 | unsigned int status; 20 | status = RTIMER_ARCH_TIMER_BASE->TC_SR; 21 | if (status & AT91C_TC_CPAS) { 22 | rtimer_run_next(); 23 | } 24 | *AT91C_AIC_EOICR = 0; 25 | } 26 | 27 | void NACKEDFUNC 28 | rtimer_interrupt (void) { 29 | ISR_STORE(); 30 | ISR_ENABLE_NEST(); 31 | rtimer_int_safe(); 32 | ISR_DISABLE_NEST(); 33 | ISR_RESTORE(); 34 | } 35 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/rtimer-arch-interrupt.h: -------------------------------------------------------------------------------- 1 | #ifndef RTIMER_ARCH_INTERRUPT_H_P0PXG70757__ 2 | #define RTIMER_ARCH_INTERRUPT_H_P0PXG70757__ 3 | 4 | void rtimer_interrupt (void); 5 | 6 | #endif /* RTIMER_ARCH_INTERRUPT_H_P0PXG70757__ */ 7 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/rtimer-arch.c: -------------------------------------------------------------------------------- 1 | #include "rtimer-arch.h" 2 | #include 3 | #include "rtimer-arch-interrupt.h" 4 | 5 | #define DEBUG 1 6 | #if DEBUG 7 | #include 8 | #define PRINTF(...) printf(__VA_ARGS__) 9 | #else 10 | #define PRINTF(...) 11 | #endif 12 | 13 | static rtimer_clock_t offset; 14 | 15 | void 16 | rtimer_arch_init(void) 17 | { 18 | offset = 0; 19 | RTIMER_ARCH_TIMER_BASE->TC_CMR = 20 | (AT91C_TC_WAVE | AT91C_TC_WAVESEL_UP | AT91C_TC_CLKS_TIMER_DIV5_CLOCK); 21 | RTIMER_ARCH_TIMER_BASE->TC_RA = 0xffff; 22 | RTIMER_ARCH_TIMER_BASE->TC_IER = AT91C_TC_CPAS; 23 | *AT91C_PMC_PCER = (1 << RTIMER_ARCH_TIMER_ID); 24 | AT91C_AIC_SMR[RTIMER_ARCH_TIMER_ID] = 25 | AT91C_AIC_SRCTYPE_INT_POSITIVE_EDGE | 6; 26 | AT91C_AIC_SVR[RTIMER_ARCH_TIMER_ID] = (unsigned long)rtimer_interrupt; 27 | *AT91C_AIC_IECR = (1 << RTIMER_ARCH_TIMER_ID); 28 | RTIMER_ARCH_TIMER_BASE->TC_CCR = AT91C_TC_SWTRG | AT91C_TC_CLKEN; 29 | PRINTF("rtimer_arch_init: Done\n"); 30 | } 31 | 32 | void 33 | rtimer_arch_schedule(rtimer_clock_t t) 34 | { 35 | RTIMER_ARCH_TIMER_BASE->TC_RA = t + offset; 36 | PRINTF("rtimer_arch_schedule: %d\n",t); 37 | } 38 | 39 | void 40 | rtimer_arch_set(rtimer_clock_t t) 41 | { 42 | offset = t - RTIMER_ARCH_TIMER_BASE->TC_CV; 43 | } 44 | 45 | rtimer_clock_t 46 | rtimer_arch_now(void) 47 | { 48 | return RTIMER_ARCH_TIMER_BASE->TC_CV + offset; 49 | } 50 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/rtimer-arch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * Header file for the AT91SAM7S-specific rtimer code 4 | * \author 5 | * Simon Berg 6 | */ 7 | 8 | #ifndef RTIMER_ARCH_H_ 9 | #define RTIMER_ARCH_H_ 10 | 11 | #include "sys/rtimer.h" 12 | 13 | #define RTIMER_ARCH_TIMER_ID AT91C_ID_TC1 14 | #define RTIMER_ARCH_TIMER_BASE AT91C_BASE_TC1 15 | 16 | #define RTIMER_ARCH_SECOND (MCK/1024) 17 | 18 | void rtimer_arch_set(rtimer_clock_t t); 19 | 20 | rtimer_clock_t rtimer_arch_now(void); 21 | 22 | #endif /* RTIMER_ARCH_H_ */ 23 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/startup-SAM7S.c: -------------------------------------------------------------------------------- 1 | void 2 | Reset(void) 3 | { 4 | volatile int dummy =0; 5 | } 6 | 7 | static void 8 | Vectors(void) __attribute__ ((naked, section(".vectrom"))); 9 | 10 | static void 11 | Vectors(void) 12 | { 13 | asm("ldr pc, %0\n"::"r" (Reset)); 14 | } 15 | 16 | 17 | 18 | void foo_dummy() 19 | { 20 | Vectors(); 21 | } 22 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/sys-interrupt.h: -------------------------------------------------------------------------------- 1 | #ifndef SYS_INTERRUPT_H_QIHZ66NP8K__ 2 | #define SYS_INTERRUPT_H_QIHZ66NP8K__ 3 | 4 | 5 | /* Returns true if it handled an activbe interrupt */ 6 | typedef int (*SystemInterruptFunc)(); 7 | 8 | typedef struct _SystemInterruptHandler SystemInterruptHandler; 9 | struct _SystemInterruptHandler 10 | { 11 | SystemInterruptHandler *next; 12 | SystemInterruptFunc handler; 13 | }; 14 | 15 | 16 | void 17 | sys_interrupt_enable(); 18 | 19 | void 20 | sys_interrupt_disable(); 21 | 22 | void 23 | sys_interrupt_append_handler(SystemInterruptHandler *handler); 24 | 25 | void 26 | sys_interrupt_prepend_handler(SystemInterruptHandler *handler); 27 | 28 | void 29 | sys_interrupt_remove_handler(SystemInterruptHandler *handler); 30 | 31 | #endif /* SYS_INTERRUPT_H_QIHZ66NP8K__ */ 32 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/uip-log.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void uip_log(char *msg) 4 | { 5 | printf("uip: %s\n", msg); 6 | } 7 | -------------------------------------------------------------------------------- /contiki/cpu/arm/at91sam7s/usb-interrupt.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | static void 8 | usb_int_safe (void) __attribute__((noinline)); 9 | 10 | static void 11 | usb_int_safe (void) 12 | { 13 | unsigned int int_status; 14 | /* putchar('*'); */ 15 | int_status = *AT91C_UDP_ISR & *AT91C_UDP_IMR; 16 | 17 | if (int_status & (AT91C_UDP_EP0 | AT91C_UDP_EP1 | AT91C_UDP_EP2 18 | | AT91C_UDP_EP3)) { 19 | unsigned int ep_index; 20 | /* Handle enabled interrupts */ 21 | for (ep_index = 0; ep_index < 4; ep_index++) { 22 | if (int_status & (1< 5 | #include 6 | #include 7 | 8 | PROCESS_NAME(sdcard_process); 9 | 10 | void 11 | efs_sdcard_init(); 12 | 13 | FileSystem * 14 | efs_sdcard_get_fs(); 15 | 16 | /* True if a card is ready to read or write */ 17 | int 18 | sdcard_ready(); 19 | 20 | extern process_event_t sdcard_inserted_event; 21 | 22 | extern process_event_t sdcard_removed_event; 23 | 24 | void 25 | sdcard_event_process(struct process *p); 26 | 27 | #endif /* SDCARD_H_KJBBKS6O57__ */ 28 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/SD-card/efsl_spi.h: -------------------------------------------------------------------------------- 1 | #ifndef EFSL_SPI_H_6B6MX40N68__ 2 | #define EFSL_SPI_H_6B6MX40N68__ 3 | 4 | #include 5 | 6 | struct hwInterface{ 7 | eint32 sectorCount; 8 | }; 9 | typedef struct hwInterface hwInterface; 10 | 11 | esint8 if_initInterface(hwInterface* file,eint8* opts); 12 | esint8 if_readBuf(hwInterface* file,euint32 address,euint8* buf); 13 | esint8 if_writeBuf(hwInterface* file,euint32 address,euint8* buf); 14 | esint8 if_setPos(hwInterface* file,euint32 address); 15 | 16 | void if_spiInit(hwInterface *iface); 17 | void if_spiSetSpeed(euint8 speed); 18 | euint8 if_spiSend(hwInterface *iface, euint8 outgoing); 19 | 20 | 21 | #endif /* EFSL_SPI_H_6B6MX40N68__ */ 22 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/SD-card/sdcard.h: -------------------------------------------------------------------------------- 1 | #ifndef SDCARD_H_KJBBKS6O57__ 2 | #define SDCARD_H_KJBBKS6O57__ 3 | 4 | #include 5 | 6 | PROCESS_NAME(sdcard_process); 7 | 8 | void 9 | sdcard_init(); 10 | 11 | /* True if a card is ready to read or write */ 12 | int 13 | sdcard_ready(); 14 | 15 | extern process_event_t sdcard_inserted_event; 16 | 17 | extern process_event_t sdcard_removed_event; 18 | 19 | void 20 | sdcard_event_process(struct process *p); 21 | 22 | #endif /* SDCARD_H_KJBBKS6O57__ */ 23 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/dbg-io/dbg-printf.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | static StrFormatResult 7 | write_str(void *user_data, const char *data, unsigned int len) 8 | { 9 | if (len > 0) dbg_send_bytes((unsigned char*)data, len); 10 | return STRFORMAT_OK; 11 | } 12 | 13 | 14 | static StrFormatContext ctxt = 15 | { 16 | write_str, 17 | NULL 18 | }; 19 | int 20 | printf(const char *fmt, ...) 21 | { 22 | int res; 23 | va_list ap; 24 | va_start(ap, fmt); 25 | res = format_str_v(&ctxt, fmt, ap); 26 | va_end(ap); 27 | return res; 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/dbg-io/dbg-putchar.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #undef putchar 6 | #undef putc 7 | 8 | int 9 | putchar(int c) 10 | { 11 | dbg_putchar(c); 12 | return c; 13 | } 14 | 15 | int 16 | putc(int c, FILE *f) 17 | { 18 | dbg_putchar(c); 19 | return c; 20 | } 21 | 22 | int 23 | __sp(struct _reent *_ptr, int c, FILE *_p) { 24 | dbg_putchar(c); 25 | return c; 26 | } 27 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/dbg-io/dbg-puts.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int 6 | puts(const char *str) 7 | { 8 | dbg_send_bytes((unsigned char*)str, strlen(str)); 9 | dbg_putchar('\n'); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/dbg-io/dbg-snprintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | struct FmtBuffer 6 | { 7 | char *pos; 8 | size_t left; 9 | }; 10 | 11 | static StrFormatResult 12 | buffer_str(void *user_data, const char *data, unsigned int len) 13 | { 14 | struct FmtBuffer *buffer = (struct FmtBuffer*)user_data; 15 | if (len >= buffer->left) { 16 | len = buffer->left; 17 | len--; 18 | } 19 | 20 | memcpy(buffer->pos, data, len); 21 | buffer->pos += len; 22 | buffer->left -= len; 23 | return STRFORMAT_OK; 24 | } 25 | 26 | int snprintf(char *str, size_t size, const char *format, ...) 27 | { 28 | int res; 29 | va_list ap; 30 | va_start(ap, format); 31 | res = vsnprintf(str, size, format, ap); 32 | va_end(ap); 33 | return res; 34 | } 35 | 36 | int vsnprintf(char *str, size_t size, const char *format, va_list ap) 37 | { 38 | struct FmtBuffer buffer; 39 | StrFormatContext ctxt; 40 | int res; 41 | ctxt.write_str = buffer_str; 42 | ctxt.user_data = &buffer; 43 | buffer.pos = str; 44 | buffer.left = size; 45 | res = format_str_v(&ctxt, format, ap); 46 | *buffer.pos = '\0'; 47 | return res; 48 | } 49 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/dbg-io/dbg-sprintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | static StrFormatResult 6 | buffer_str(void *user_data, const char *data, unsigned int len) 7 | { 8 | memcpy(*(char**)user_data, data, len); 9 | (*(char**)user_data) += len; 10 | return STRFORMAT_OK; 11 | } 12 | 13 | int 14 | sprintf(char *str, const char *format, ...) 15 | { 16 | StrFormatContext ctxt; 17 | int res; 18 | va_list ap; 19 | va_start(ap, format); 20 | ctxt.write_str = buffer_str; 21 | ctxt.user_data = &str; 22 | res = format_str_v(&ctxt, format, ap); 23 | *str = '\0'; 24 | va_end(ap); 25 | return res; 26 | } 27 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/dbg-io/strformat.h: -------------------------------------------------------------------------------- 1 | #ifndef STRFORMAT_H_ 2 | #define STRFORMAT_H_ 3 | 4 | #include 5 | 6 | #define STRFORMAT_OK 0 7 | #define STRFORMAT_FAILED 1 8 | typedef unsigned int StrFormatResult; 9 | 10 | /* The data argument may only be considered valid during the function call */ 11 | typedef StrFormatResult (*StrFormatWrite)(void *user_data, const char *data, unsigned int len); 12 | 13 | typedef struct _StrFormatContext 14 | { 15 | StrFormatWrite write_str; 16 | void *user_data; 17 | } StrFormatContext; 18 | 19 | int format_str(const StrFormatContext *ctxt, const char *format, ...) 20 | __attribute__ ((__format__ (__printf__, 2,3))); 21 | 22 | int 23 | format_str_v(const StrFormatContext *ctxt, const char *format, va_list ap); 24 | 25 | #endif /* STRFORMAT_H_ */ 26 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/Makefile.usb: -------------------------------------------------------------------------------- 1 | ### Put generated sources in a separate directory 2 | BUILTSRCDIR = src_$(TARGET) 3 | ifeq (${wildcard $(BUILTSRCDIR)},) 4 | DUMMY := ${shell mkdir $(BUILTSRCDIR)} 5 | endif 6 | 7 | STRUCTGEN = structgen 8 | 9 | PROJECTDIRS += $(BUILTSRCDIR) 10 | 11 | USB_STRING_DESCRIPTORS ?= $(CONTIKI_CPU_ARM)/common/usb/cdc-acm/string-descriptors.xml 12 | 13 | XMLDIRS= 14 | 15 | USB = usb-arch.c usb-core.c 16 | 17 | ifdef USB_CDC_ACM_CLASS 18 | CONTIKI_CPU_DIRS += ../common/usb/cdc-acm 19 | USB += cdc-acm.c cdc-acm-descriptors.c cdc-acm-string-descriptors.c 20 | XMLDIRS += $(CONTIKI_CPU_ARM)/common/usb/cdc-acm/ 21 | endif 22 | 23 | ifdef USB_CDC_ETH_CLASS 24 | CONTIKI_CPU_DIRS += ../common/usb/cdc-eth 25 | USB += cdc-eth.c cdc-eth-descriptors.c cdc-eth-string-descriptors.c dhcps.c 26 | XMLDIRS += $(CONTIKI_CPU_ARM)/common/usb/cdc-eth/ 27 | endif 28 | 29 | ifdef USB_MASS_STORAGE_CLASS 30 | CONTIKI_CPU_DIRS += ../common/usb/msc 31 | USB += usb-msc-bulk.c usb-rbc.c msc-descriptors-consts.c msc-descriptors.c 32 | XMLDIRS += $(CONTIKI_CPU_ARM)/common/usb/msc 33 | endif 34 | 35 | ifdef USB_MSC_QIC157 36 | CONTIKI_CPU_DIRS += ../common/usb/msc 37 | USB += usb-msc-bulk.c usb-qic157.c msc-qic157-descriptors.c msc-qic157-string-descriptors.c 38 | XMLDIRS += $(CONTIKI_CPU_ARM)/common/usb/msc 39 | endif 40 | 41 | ifdef USB_MSC_STREAMING 42 | CONTIKI_CPU_DIRS += ../common/usb/msc 43 | USB += usb-msc-bulk.c usb-streaming.c msc-scsi-streaming-descriptors-consts.c msc-scsi-streaming-descriptors.c 44 | XMLDIRS += $(CONTIKI_CPU_ARM)/common/usb/msc 45 | endif 46 | 47 | ifdef USB_MTP_CLASS 48 | CONTIKI_CPU_DIRS += ../common/usb/mtp 49 | USB += usb-mtp.c mtp-descriptors-consts.c mtp-descriptors.c 50 | STRUCTGENDIRS += $(CONTIKI_CPU_ARM)/common/usb/mtp 51 | endif 52 | 53 | vpath %.xml $(XMLDIRS) 54 | vpath %.gen.c $(STRUCTGENDIRS) 55 | 56 | %.c: %.xml 57 | $(XSLTPROC) $(CONTIKI_CPU_ARM)/common/usb/string-descriptors.xslt $^ >$(BUILTSRCDIR)/$@ 58 | 59 | %-consts.c: %.gen.c 60 | $(CPP) -I$(CFLAGS) $< | $(STRUCTGEN) --output $(BUILTSRCDIR)/$*-consts.c -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/cdc-acm/cdc-acm-string-descriptors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 0x0409 5 | 0x041d 6 | 7 | 8 | 9 | Serial interface 10 | Serieport 11 | 12 | 13 | Fluffware 14 | 15 | 16 | 0.01 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/cdc-acm/cdc-acm.h: -------------------------------------------------------------------------------- 1 | #ifndef CDC_ACM_H_UFV6K50827__ 2 | #define CDC_ACM_H_UFV6K50827__ 3 | 4 | void 5 | usb_cdc_acm_setup(); 6 | 7 | #endif /* CDC_ACM_H_UFV6K50827__ */ 8 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/cdc-eth/cdc-eth-string-descriptors.c: -------------------------------------------------------------------------------- 1 | #include "string-descriptors.h" 2 | static const struct { 3 | struct usb_st_string_descriptor base; 4 | Uint16 chars[18]; 5 | } string_descriptor_1_en= {{40, 3, {'U'}}, { 6 | 'S', 'B', ' ', 'p', 's', 'e', 'u', 'd', 'o', ' ', 'e', 't', 'h', 'e', 'r', 'n', 'e', 't'}}; 7 | static const struct { 8 | struct usb_st_string_descriptor base; 9 | Uint16 chars[8]; 10 | } string_descriptor_2_all= {{20, 3, {'F'}}, { 11 | 'l', 'u', 'f', 'f', 'w', 'a', 'r', 'e'}}; 12 | static const struct { 13 | struct usb_st_string_descriptor base; 14 | Uint16 chars[2]; 15 | } string_descriptor_3_all= {{8, 3, {'0'}}, { 16 | '.', '1'}}; 17 | static const struct { 18 | struct usb_st_string_descriptor base; 19 | Uint16 chars[11]; 20 | } string_descriptor_4_all= {{26, 3, {'0'}}, { 21 | '2', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1'}}; 22 | static const struct usb_st_string_descriptor * string_table_en[] = 23 | { 24 | &string_descriptor_1_en.base, 25 | &string_descriptor_2_all.base, 26 | &string_descriptor_3_all.base, 27 | &string_descriptor_4_all.base, 28 | }; 29 | static const struct { 30 | struct usb_st_language_descriptor base; 31 | Uint16 langs[0]; 32 | } language_descriptor = 33 | { 34 | {4, 3, {0x0409}}, 35 | {}}; 36 | static const struct { 37 | struct usb_st_string_languages base; 38 | struct usb_st_string_language_map map[0]; 39 | } string_languages_full={{1, 4, &language_descriptor.base, 40 | {{0x0409, string_table_en}}}, { 41 | } 42 | }; 43 | const struct usb_st_string_languages * const string_languages = &string_languages_full.base; 44 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/cdc-eth/cdc-eth.h: -------------------------------------------------------------------------------- 1 | #ifndef CDC_ETH_H_NUI0ULFC7C__ 2 | #define CDC_ETH_H_NUI0ULFC7C__ 3 | 4 | #include 5 | 6 | /* Should be called before usb_cdc_eth_setup */ 7 | void 8 | usb_cdc_eth_set_ifaddr(uip_ipaddr_t *addr); 9 | 10 | void 11 | usb_cdc_eth_setup(); 12 | 13 | #endif /* CDC_ETH_H_NUI0ULFC7C__ */ 14 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/cdc-eth/dhcps.h: -------------------------------------------------------------------------------- 1 | #ifndef DHCPS_H_6M2XYUGNTK__ 2 | #define DHCPS_H_6M2XYUGNTK__ 3 | #include "contiki-net.h" 4 | #include 5 | 6 | #define MAX_HLEN 6 7 | 8 | struct dhcps_client_lease 9 | { 10 | uint8_t chaddr[MAX_HLEN]; 11 | uip_ipaddr_t ipaddr; 12 | unsigned long lease_end; 13 | uint8_t flags; 14 | }; 15 | 16 | struct dhcps_config 17 | { 18 | unsigned long default_lease_time; 19 | uip_ipaddr_t netmask; 20 | uip_ipaddr_t dnsaddr; 21 | uip_ipaddr_t default_router; 22 | struct dhcps_client_lease *leases; 23 | uint8_t flags; 24 | uint8_t num_leases; 25 | }; 26 | 27 | #define DHCP_CONF_NETMASK 0x01 28 | #define DHCP_CONF_DNSADDR 0x02 29 | #define DHCP_CONF_DEFAULT_ROUTER 0x04 30 | 31 | #define DHCP_INIT_LEASE(addr0, addr1, addr2, addr3) \ 32 | {{0},{addr0, addr1, addr2, addr3},0,0} 33 | 34 | /** 35 | * Start the DHCP server 36 | * 37 | * This function starts th DHCP server with the given configuration. 38 | * The flags field determines which options are actually sent to the 39 | * client 40 | * 41 | * \param conf Pointer to a configuration struct. The configuration is 42 | * not copied and should remain constant while the server is running. 43 | * The leases pointed to by the configuration must be in writable memory. 44 | **/ 45 | void dhcps_init(const struct dhcps_config *conf); 46 | 47 | #endif /* DHCPS_H_6M2XYUGNTK__ */ 48 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/descriptors.h: -------------------------------------------------------------------------------- 1 | #ifndef DESCRIPTORS_H_RPFUB8O7OV__ 2 | #define DESCRIPTORS_H_RPFUB8O7OV__ 3 | 4 | #ifndef STRUCTGEN 5 | #include "usb.h" 6 | #endif 7 | 8 | extern const struct usb_st_device_descriptor device_descriptor; 9 | extern const struct usb_st_configuration_descriptor const *configuration_head; 10 | #endif /* DESCRIPTORS_H_RPFUB8O7OV__ */ 11 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/msc/msc-descriptors.c: -------------------------------------------------------------------------------- 1 | #include "descriptors.h" 2 | #include "usb-msc-bulk.h" 3 | #include 4 | 5 | const struct usb_st_device_descriptor device_descriptor = 6 | { 7 | sizeof(struct usb_st_device_descriptor), 8 | DEVICE, 9 | 0x0210, 10 | 0, 11 | 0, 12 | 0, 13 | CTRL_EP_SIZE, 14 | 0xffff, 15 | 0xffff, 16 | 0x0030, 17 | 2, 18 | 1, 19 | 3, 20 | 1 21 | }; 22 | 23 | const struct configuration_st { 24 | struct usb_st_configuration_descriptor configuration; 25 | struct usb_st_interface_descriptor massbulk; 26 | struct usb_st_endpoint_descriptor ep_in; 27 | struct usb_st_endpoint_descriptor ep_out; 28 | } BYTE_ALIGNED configuration_block = 29 | { 30 | /* Configuration */ 31 | { 32 | sizeof(configuration_block.configuration), 33 | CONFIGURATION, 34 | sizeof(configuration_block), 35 | 1, 36 | 1, 37 | 0, 38 | 0x80, 39 | 50 40 | }, 41 | { 42 | sizeof(configuration_block.massbulk), 43 | INTERFACE, 44 | 0, 45 | 0, 46 | 2, 47 | MASS_STORAGE, 48 | MASS_RBC, 49 | MASS_BULK_ONLY, 50 | 0 51 | }, 52 | { 53 | sizeof(configuration_block.ep_in), 54 | ENDPOINT, 55 | 0x81, 56 | 0x02, 57 | 64, 58 | 0 59 | }, 60 | { 61 | sizeof(configuration_block.ep_out), 62 | ENDPOINT, 63 | 0x02, 64 | 0x02, 65 | 64, 66 | 0 67 | } 68 | 69 | }; 70 | 71 | const struct usb_st_configuration_descriptor const *configuration_head = 72 | (struct usb_st_configuration_descriptor const*)&configuration_block; 73 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/msc/msc-string-descriptors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 0x0409 5 | 6 | 7 | 8 | USB mass storage test 9 | 10 | 11 | Fluffware 12 | 13 | 14 | F00000000001 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/msc/rbc_struct.h: -------------------------------------------------------------------------------- 1 | #ifndef RBC_STRUCT_H_10L0HKARRV__ 2 | #define RBC_STRUCT_H_10L0HKARRV__ 3 | 4 | #include 5 | 6 | struct rbc_read_capacity_cmd 7 | { 8 | uint8_t op_code; 9 | uint8_t reserved1; 10 | uint8_t reserved2; 11 | uint8_t reserved3; 12 | uint8_t reserved4; 13 | uint8_t reserved5; 14 | uint8_t reserved6; 15 | uint8_t reserved7; 16 | uint8_t reserved8; 17 | uint8_t control; 18 | } CC_BYTE_ALIGNED; 19 | 20 | struct rbc_read_capacity_data 21 | { 22 | uint32_bytes last_logical_block; 23 | uint32_bytes block_length; 24 | } CC_BYTE_ALIGNED; 25 | 26 | struct rbc_device_parameters_page 27 | { 28 | struct spc2_mode_page head; 29 | uint8_t flags1; 30 | uint16_bytes logical_block_size; 31 | uint40_bytes num_logical_blocks; 32 | uint8_t power_performance; 33 | uint8_t flags2; 34 | uint8_t reserved; 35 | } CC_BYTE_ALIGNED; 36 | 37 | struct rbc_read_cmd 38 | { 39 | uint8_t op_code; 40 | uint8_t reserved1; 41 | uint32_bytes logical_block_address; 42 | uint8_t reserved2; 43 | uint16_bytes transfer_length; 44 | uint8_t control; 45 | } CC_BYTE_ALIGNED; 46 | 47 | struct rbc_write_cmd 48 | { 49 | uint8_t op_code; 50 | uint8_t flags; 51 | uint32_bytes logical_block_address; 52 | uint8_t reserved; 53 | uint16_bytes transfer_length; 54 | uint8_t control; 55 | } CC_BYTE_ALIGNED; 56 | 57 | 58 | #endif /* RBC_STRUCT_H_10L0HKARRV__ */ 59 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/string-descriptors.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/string-descriptors.h: -------------------------------------------------------------------------------- 1 | #ifndef STRUCTGEN 2 | #include "usb.h" 3 | #endif 4 | #include 5 | 6 | struct usb_st_string_language_map 7 | { 8 | uint16_t lang_id; 9 | const struct usb_st_string_descriptor * const *descriptors; 10 | }; 11 | 12 | struct usb_st_string_languages 13 | { 14 | uint8_t num_lang; 15 | uint8_t max_index; 16 | const struct usb_st_language_descriptor *lang_descr; 17 | const struct usb_st_string_language_map map[1]; 18 | }; 19 | 20 | extern const struct usb_st_string_languages * const string_languages; 21 | 22 | const uint8_t * 23 | usb_class_get_string_descriptor(uint16_t lang, uint8_t index); 24 | -------------------------------------------------------------------------------- /contiki/cpu/arm/common/usb/usb-core.h: -------------------------------------------------------------------------------- 1 | #ifndef USB_CORE_H_YIKJDA7S1X__ 2 | #define USB_CORE_H_YIKJDA7S1X__ 3 | 4 | #include 5 | 6 | struct USB_request_st usb_setup_buffer; 7 | 8 | void 9 | usb_send_ctrl_response(const uint8_t *data, unsigned int len); 10 | 11 | void 12 | usb_error_stall(); 13 | 14 | void 15 | usb_send_ctrl_status(); 16 | 17 | typedef void (*usb_ctrl_data_callback)(uint8_t *data, unsigned int length); 18 | 19 | void 20 | usb_get_ctrl_data(uint8_t *data, unsigned int length, 21 | usb_ctrl_data_callback cb); 22 | 23 | #endif /* USB_CORE_H_YIKJDA7S1X__ */ 24 | -------------------------------------------------------------------------------- /contiki/cpu/arm/openocd/arm7_wig.cfg: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Change the default telnet port... 4 | telnet_port 4444 5 | # GDB connects here 6 | gdb_port 3333 7 | # GDB can also flash my flash! 8 | gdb_memory_map enable 9 | gdb_flash_program enable 10 | 11 | # Wiggler interface 12 | interface parport 13 | parport_port 0 14 | parport_cable wiggler_ntrst_inverted 15 | jtag_speed 0 16 | set CPUTAPID 0x3BA00477 17 | set BSTAPID 0x16410041 18 | source [find target/stm32F10xxx.cfg] 19 | 20 | -------------------------------------------------------------------------------- /contiki/cpu/arm/openocd/target/stm32F10xxx.cfg: -------------------------------------------------------------------------------- 1 | # STM32 Cortex M3 2 | 3 | if { [info exists CHIPNAME] } { 4 | set _CHIPNAME $CHIPNAME 5 | } else { 6 | set _CHIPNAME stm32F10xxx 7 | } 8 | 9 | if { [info exists ENDIAN] } { 10 | set _ENDIAN $ENDIAN 11 | } else { 12 | set _ENDIAN little 13 | } 14 | 15 | if { [info exists CPUTAPID ] } { 16 | set _CPUTAPID $CPUTAPID 17 | } else { 18 | # force an error till we get a good number 19 | set _CPUTAPID 0xffffffff 20 | } 21 | 22 | #use combined on interfaces or targets that can't set TRST/SRST separately 23 | reset_config trst_and_srst 24 | jtag_nsrst_delay 1 25 | 26 | #jtag scan chain 27 | jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID 28 | 29 | # The target 30 | set _TARGETNAME [format "%s.cpu" $_CHIPNAME] 31 | target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME -variant cortex_m3 32 | 33 | $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 0x4000 -work-area-backup 0 34 | 35 | 36 | if { [info exists BSTAPID ] } { 37 | set _BSTAPID $BSTAPID 38 | } else { 39 | # force an error till we get a good number 40 | set _BSTAPID 0xffffffff 41 | } 42 | 43 | #jtag scan chain 44 | jtag newtap $_CHIPNAME bs -irlen 5 -ircapture 0x1 -irmask 0xf -expected-id $_BSTAPID 45 | 46 | flash bank stm32x 0 0 0 0 0 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /contiki/cpu/arm/stm32f103/clock.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | static volatile clock_time_t current_clock = 0; 9 | static volatile unsigned long current_seconds = 0; 10 | static unsigned int second_countdown = CLOCK_SECOND; 11 | 12 | void 13 | SysTick_handler(void) __attribute__ ((interrupt)); 14 | 15 | void 16 | SysTick_handler(void) 17 | { 18 | (void)SysTick->CTRL; 19 | SCB->ICSR = SCB_ICSR_PENDSTCLR; 20 | current_clock++; 21 | if(etimer_pending() && etimer_next_expiration_time() <= current_clock) { 22 | etimer_request_poll(); 23 | /* printf("%d,%d\n", clock_time(),etimer_next_expiration_time ()); */ 24 | 25 | } 26 | if (--second_countdown == 0) { 27 | current_seconds++; 28 | second_countdown = CLOCK_SECOND; 29 | } 30 | } 31 | 32 | 33 | void 34 | clock_init() 35 | { 36 | NVIC_SET_SYSTICK_PRI(8); 37 | SysTick->LOAD = MCK/8/CLOCK_SECOND; 38 | SysTick->CTRL = SysTick_CTRL_ENABLE | SysTick_CTRL_TICKINT; 39 | } 40 | 41 | clock_time_t 42 | clock_time(void) 43 | { 44 | return current_clock; 45 | } 46 | 47 | #if 0 48 | /* The inner loop takes 4 cycles. The outer 5+SPIN_COUNT*4. */ 49 | 50 | #define SPIN_TIME 2 /* us */ 51 | #define SPIN_COUNT (((MCK*SPIN_TIME/1000000)-5)/4) 52 | 53 | #ifndef __MAKING_DEPS__ 54 | 55 | void 56 | clock_delay(unsigned int t) 57 | { 58 | #ifdef __THUMBEL__ 59 | asm volatile("1: mov r1,%2\n2:\tsub r1,#1\n\tbne 2b\n\tsub %0,#1\n\tbne 1b\n":"=l"(t):"0"(t),"l"(SPIN_COUNT)); 60 | #else 61 | #error Must be compiled in thumb mode 62 | #endif 63 | } 64 | #endif 65 | #endif /* __MAKING_DEPS__ */ 66 | 67 | unsigned long 68 | clock_seconds(void) 69 | { 70 | return current_seconds; 71 | } 72 | -------------------------------------------------------------------------------- /contiki/cpu/arm/stm32f103/debug-uart.h: -------------------------------------------------------------------------------- 1 | #ifndef DEBUG_UART_H_1V2039076V__ 2 | #define DEBUG_UART_H_1V2039076V__ 3 | 4 | #ifndef dbg_setup_uart 5 | #define dbg_setup_uart dbg_setup_uart_default 6 | #endif 7 | 8 | void 9 | dbg_setup_uart(); 10 | 11 | void 12 | dbg_set_input_handler(void (*handler)(const char *inp, unsigned int len)); 13 | 14 | unsigned int 15 | dbg_send_bytes(const unsigned char *seq, unsigned int len); 16 | 17 | 18 | void 19 | dbg_putchar(const char ch); 20 | 21 | void 22 | dbg_blocking_putchar(const char ch); 23 | 24 | void 25 | dbg_drain(); 26 | 27 | #endif /* DEBUG_UART_H_1V2039076V__ */ 28 | -------------------------------------------------------------------------------- /contiki/cpu/arm/stm32f103/nvic.h: -------------------------------------------------------------------------------- 1 | #ifndef NVIC_H_LE94F5JS4D__ 2 | #define NVIC_H_LE94F5JS4D__ 3 | #include 4 | #include 5 | 6 | #define NVIC_ENABLE_INT(i) WRITE_REG(NVIC->ISER[(i)/32], 1<<((i) & 0x1f)) 7 | #define NVIC_DISABLE_INT(i) WRITE_REG(NVIC->ICER[(i)/32], 1<<((i) & 0x1f)) 8 | #define NVIC_SET_PENDING(i) WRITE_REG(NVIC->ISPR[(i)/32], 1<<((i) & 0x1f)) 9 | #define NVIC_CLEAR_PENDING(i) WRITE_REG(NVIC->ICPR[(i)/32], 1<<((i) & 0x1f)) 10 | 11 | #define NVIC_SET_PRIORITY(i,p) \ 12 | MODIFY_REG(NVIC->IPR[(i)/4], 0xf<<(((i)&3)*8), (p)<<(((i)&3)*8)) 13 | 14 | #define NVIC_SET_SYSTICK_PRI(p) MODIFY_REG(SCB->SHPR[2], 0xf<<24, (p)<<24) 15 | 16 | #endif /* NVIC_H_LE94F5JS4D__ */ 17 | -------------------------------------------------------------------------------- /contiki/cpu/arm/stm32f103/rtimer-arch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * Header file for the STM32F103-specific rtimer code 4 | * \author 5 | * Simon Berg 6 | */ 7 | 8 | #ifndef RTIMER_ARCH_H_ 9 | #define RTIMER_ARCH_H_ 10 | 11 | #include "sys/rtimer.h" 12 | 13 | #define RTIMER_ARCH_SECOND (MCK/1024) 14 | 15 | void rtimer_arch_set(rtimer_clock_t t); 16 | 17 | rtimer_clock_t rtimer_arch_now(void); 18 | 19 | #endif /* RTIMER_ARCH_H_ */ 20 | -------------------------------------------------------------------------------- /contiki/cpu/arm/stm32f103/stm32f10x_conf.h: -------------------------------------------------------------------------------- 1 | #define _RCC 2 | #define _DMA 3 | #define _GPIOA 4 | #define _GPIOB 5 | #define _GPIOC 6 | #define _GPIOD 7 | #define _GPIOE 8 | #define _BKP 9 | #define _AFIO 10 | #define _USART1 11 | #define _NVIC 12 | #define _SysTick 13 | #define _USB 14 | #define _TIM1 15 | #define _TIM2 16 | #define _TIM3 17 | #define _TIM4 18 | #define _I2C1 19 | #define _I2C2 20 | #define _DMA1_Channel1 21 | #define _DMA1_Channel2 22 | #define _DMA1_Channel3 23 | #define _DMA1_Channel4 24 | #define _DMA1_Channel5 25 | #define _DMA1_Channel6 26 | #define _DMA2_Channel1 27 | #define _DMA2_Channel2 28 | #define _DMA2_Channel3 29 | #define _DMA2_Channel4 30 | #define _DMA2_Channel5 31 | #define _SPI1 32 | #define _SPI2 33 | #define _EXTI 34 | -------------------------------------------------------------------------------- /contiki/cpu/arm/stm32f103/usb-stm32f103.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef USB_STM32F103_ENABLE_ALT_COPY 4 | /* Use an alternate data copying function */ 5 | #define USB_BUFFER_ARCH_ALT_COPY USB_BUFFER_ARCH_FLAG_1 6 | 7 | /* Copy len bytes of data from the buffer to dedicated USB 8 | memory. buffer->data must be updated */ 9 | extern void 10 | copy_to_hw_buffer(USBBuffer *buffer,unsigned int offset, unsigned int len); 11 | 12 | /* Copy len bytes of data to the buffer from dedicated USB memory. 13 | buffer->data must be updated */ 14 | extern void 15 | copy_from_hw_buffer(USBBuffer *buffer,unsigned int offset, unsigned int len); 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /contiki/cpu/arm/stm32l152/Makefile.stm32l152.gnu: -------------------------------------------------------------------------------- 1 | PROP_SYS_ARCH_S = startup_stm32l152xe.s 2 | 3 | ### Compiler definitions 4 | GCC = 1 5 | CC = arm-none-eabi-gcc 6 | LD = arm-none-eabi-gcc 7 | SIZE = arm-none-eabi-size 8 | AS = arm-none-eabi-as 9 | AR = arm-none-eabi-ar 10 | NM = arm-none-eabi-nm 11 | OBJCOPY = arm-none-eabi-objcopy 12 | STRIP = arm-none-eabi-strip 13 | 14 | %.ihex: %.$(TARGET) 15 | $(OBJCOPY) -O ihex $^ $@ 16 | %.bin: %.$(TARGET) 17 | $(OBJCOPY) -O binary $^ $@ 18 | %.co: %.c 19 | $(CC) $(CFLAGS) -c -DAUTOSTART_ENABLE $< -o $@ 20 | 21 | 22 | ifndef LDSCRIPT 23 | LDSCRIPT = $(CONTIKI)/platform/$(TARGET)/stm32cube-lib/stm32cube-prj/linker/gcc/STM32L152RETx_FLASH.ld 24 | endif 25 | 26 | #ASFLAGS += -mcpu=cortex-m3 -mthumb 27 | 28 | # this platform wields a STM32L152VB medium-density device 29 | CFLAGS+=-DSTM32L1XX_MD=1 30 | 31 | CFLAGS+=\ 32 | -I$(CONTIKI)/cpu/arm/common/CMSIS \ 33 | -Wall -g -O0 \ 34 | -DWITH_UIP -DWITH_ASCII \ 35 | -mcpu=cortex-m3 \ 36 | -mthumb \ 37 | -mno-unaligned-access \ 38 | -mfix-cortex-m3-ldrd \ 39 | -std=gnu99 \ 40 | -Wl,-cref \ 41 | -D __SOURCEFILE__=\"$*.c\" 42 | 43 | 44 | LDFLAGS += -Wl,-Map=contiki-$(TARGET).map,--cref,--no-warn-mismatch 45 | 46 | 47 | LDLIBS += $(CONTIKI_CPU)/lib/smallprintf_thumb2.a 48 | 49 | 50 | 51 | LDFLAGS += -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -T$(LDSCRIPT) -Wl,-Map=output.map -Wl,--gc-sections -lm 52 | 53 | 54 | LDFLAGS += $(LDLIBS) 55 | 56 | SMALL=1 57 | ifeq ($(SMALL),1) 58 | CFLAGS += -ffunction-sections 59 | CFLAGS += -fdata-sections 60 | 61 | LDFLAGS += -Wl,--undefined=_reset_vector__,--undefined=InterruptVectors,--undefined=_copy_data_init__,--undefined=_clear_bss_init__,--undefined=_end_of_init__ 62 | 63 | endif # /SMALL 64 | 65 | 66 | -------------------------------------------------------------------------------- /contiki/cpu/arm/stm32l152/lib/e_stdio_intonly_thumb2.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/cpu/arm/stm32l152/lib/e_stdio_intonly_thumb2.a -------------------------------------------------------------------------------- /contiki/cpu/arm/stm32l152/lib/e_stdio_thumb2.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/cpu/arm/stm32l152/lib/e_stdio_thumb2.a -------------------------------------------------------------------------------- /contiki/cpu/arm/stm32l152/lib/smallprintf_thumb2.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/cpu/arm/stm32l152/lib/smallprintf_thumb2.a -------------------------------------------------------------------------------- /contiki/cpu/arm/stm32l152/mtarch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, STMicroelectronics. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * 30 | */ 31 | /*---------------------------------------------------------------------------*/ 32 | /* 33 | * Implementation of multithreading in ARM Cortex-M3. To be done. 34 | */ 35 | #ifndef __MTARCH_H__ 36 | #define __MTARCH_H__ 37 | /*---------------------------------------------------------------------------*/ 38 | struct mtarch_thread { 39 | short mt_thread; 40 | }; 41 | /*---------------------------------------------------------------------------*/ 42 | #endif /* __MTARCH_H__ */ 43 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/Makefile.cc13xx: -------------------------------------------------------------------------------- 1 | TI_XXWARE_PATH = lib/cc13xxware 2 | 3 | CONTIKI_CPU_SOURCEFILES += smartrf-settings.c prop-mode.c 4 | 5 | CFLAGS += -DCPU_FAMILY_CC13XX=1 6 | 7 | include $(CONTIKI_CPU)/Makefile.cc26xx-cc13xx 8 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/Makefile.cc26xx: -------------------------------------------------------------------------------- 1 | TI_XXWARE_PATH = lib/cc26xxware 2 | 3 | include $(CONTIKI_CPU)/Makefile.cc26xx-cc13xx 4 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/lib/cc13xxware/README.md: -------------------------------------------------------------------------------- 1 | This is a git-versioned subset and slightly modified version of TI's [CC13xxware](http://www.ti.com/tool/cc13xxWare). 2 | 3 | This repository's sole purpose is to provide CC13xxware as a submodule for the [Contiki Operating System](https://github.com/contiki-os/contiki/). 4 | 5 | New versions will only appear in this repository only if and when Contiki's CC13x port needs to use them. 6 | 7 | Modifications (for current and upcoming versions): 8 | 9 | * Only files used by Contiki are included here. Documentation and files related to IAR and CCS have been removed. 10 | * Line-endings have been converted to Unix 11 | * File permissions have been changed to 644 12 | 13 | All sources are and will remain otherwise intact. 14 | 15 | If you need CC13xxware for any other purpose, do not clone this repository. A full version of the software can be downloaded by following the above link. A history of previous versions can be found in [TI's relevant wiki page](http://processors.wiki.ti.com/index.php/CC13xxWare). 16 | 17 | Do not open pulls / issues on this repository, unless they are immediately related to using CC13xxware with Contiki. 18 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/lib/cc13xxware/driverlib/aon_rtc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/cpu/cc26xx-cc13xx/lib/cc13xxware/driverlib/aon_rtc.c -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/lib/cc13xxware/driverlib/aux_smph.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Filename: aux_smph.c 3 | * Revised: 2015-01-13 16:59:55 +0100 (Tue, 13 Jan 2015) 4 | * Revision: 42365 5 | * 6 | * Description: Driver for the AUX Semaphore. 7 | * 8 | * Copyright (c) 2015, Texas Instruments Incorporated 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions are met: 13 | * 14 | * 1) Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 17 | * 2) Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 22 | * be used to endorse or promote products derived from this software without 23 | * specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ******************************************************************************/ 38 | 39 | #include 40 | 41 | // See aux_smph.h for implementation 42 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/lib/cc13xxware/driverlib/ccfgread.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Filename: ccfgread.c 3 | * Revised: 2015-08-04 11:44:20 +0200 (Tue, 04 Aug 2015) 4 | * Revision: 44329 5 | * 6 | * Description: API for reading CCFG. 7 | * 8 | * Copyright (c) 2015, Texas Instruments Incorporated 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions are met: 13 | * 14 | * 1) Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 17 | * 2) Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 22 | * be used to endorse or promote products derived from this software without 23 | * specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ******************************************************************************/ 38 | 39 | #include 40 | 41 | // See ccfgread.h for implementation 42 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/lib/cc13xxware/driverlib/event.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Filename: event.c 3 | * Revised: 2015-01-13 16:59:55 +0100 (Tue, 13 Jan 2015) 4 | * Revision: 42365 5 | * 6 | * Description: Driver for the Event Fabric. 7 | * 8 | * Copyright (c) 2015, Texas Instruments Incorporated 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions are met: 13 | * 14 | * 1) Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 17 | * 2) Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 22 | * be used to endorse or promote products derived from this software without 23 | * specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ******************************************************************************/ 38 | 39 | #include 40 | 41 | // See event.h for implementation 42 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/lib/cc13xxware/driverlib/gpio.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Filename: gpio.c 3 | * Revised: 2015-01-13 16:59:55 +0100 (Tue, 13 Jan 2015) 4 | * Revision: 42365 5 | * 6 | * Description: Driver for the GPIO 7 | * 8 | * Copyright (c) 2015, Texas Instruments Incorporated 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions are met: 13 | * 14 | * 1) Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 17 | * 2) Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 22 | * be used to endorse or promote products derived from this software without 23 | * specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ******************************************************************************/ 38 | 39 | #include 40 | 41 | // see gpio.h for implementation 42 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/lib/cc13xxware/driverlib/watchdog.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Filename: wdt.c 3 | * Revised: 2015-01-13 16:59:55 +0100 (Tue, 13 Jan 2015) 4 | * Revision: 42365 5 | * 6 | * Description: Driver for the Watchdog Timer. 7 | * 8 | * Copyright (c) 2015, Texas Instruments Incorporated 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions are met: 13 | * 14 | * 1) Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 17 | * 2) Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 22 | * be used to endorse or promote products derived from this software without 23 | * specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ******************************************************************************/ 38 | 39 | #include 40 | 41 | // See watchdog.h for implementation 42 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/lib/cc26xxware/README.md: -------------------------------------------------------------------------------- 1 | This is a git-versioned subset and slightly modified version of TI's [CC26xxware](http://www.ti.com/tool/cc26xxware). 2 | 3 | This repository's sole purpose is to provide CC26xxware as a submodule for the [Contiki Operating System](https://github.com/contiki-os/contiki/). 4 | 5 | New versions will only appear in this repository only if and when Contiki's CC26xx port needs to use them. 6 | 7 | Modifications (for current and upcoming versions): 8 | 9 | * Only files used by Contiki are included here. Documentation and files related to IAR and CCS have been removed. 10 | * Line-endings have been converted to Unix 11 | * File permissions have been changed to 644 12 | 13 | All sources are and will remain otherwise intact. 14 | 15 | If you need CC26xxware for any other purpose, do not clone this repository. A full version of the software can be downloaded by following the above link. A history of previous versions can be found in [TI's relevant wiki page](http://processors.wiki.ti.com/index.php/CC26xxware). 16 | 17 | Do not open pulls / issues on this repository, unless they are immediately related to using CC26xxware with Contiki. 18 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/lib/cc26xxware/driverlib/aon_rtc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BadgeWiz/TR16Badge/f5c7b31b840600ea04a0b6ec5e6b4f2087643689/contiki/cpu/cc26xx-cc13xx/lib/cc26xxware/driverlib/aon_rtc.c -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/lib/cc26xxware/driverlib/ccfgread.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Filename: ccfgread.c 3 | * Revised: 2015-08-04 11:44:20 +0200 (Tue, 04 Aug 2015) 4 | * Revision: 44329 5 | * 6 | * Description: API for reading CCFG. 7 | * 8 | * Copyright (c) 2015, Texas Instruments Incorporated 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions are met: 13 | * 14 | * 1) Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 17 | * 2) Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 22 | * be used to endorse or promote products derived from this software without 23 | * specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ******************************************************************************/ 38 | 39 | #include 40 | 41 | // See ccfgread.h for implementation 42 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/lib/cc26xxware/driverlib/event.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Filename: event.c 3 | * Revised: 2015-01-13 16:59:55 +0100 (Tue, 13 Jan 2015) 4 | * Revision: 42365 5 | * 6 | * Description: Driver for the Event Fabric. 7 | * 8 | * Copyright (c) 2015, Texas Instruments Incorporated 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions are met: 13 | * 14 | * 1) Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 17 | * 2) Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 22 | * be used to endorse or promote products derived from this software without 23 | * specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ******************************************************************************/ 38 | 39 | #include 40 | 41 | // See event.h for implementation 42 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/lib/cc26xxware/driverlib/gpio.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Filename: gpio.c 3 | * Revised: 2015-01-13 16:59:55 +0100 (Tue, 13 Jan 2015) 4 | * Revision: 42365 5 | * 6 | * Description: Driver for the GPIO 7 | * 8 | * Copyright (c) 2015, Texas Instruments Incorporated 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions are met: 13 | * 14 | * 1) Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 17 | * 2) Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 22 | * be used to endorse or promote products derived from this software without 23 | * specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ******************************************************************************/ 38 | 39 | #include 40 | 41 | // see gpio.h for implementation 42 | -------------------------------------------------------------------------------- /contiki/cpu/cc26xx-cc13xx/mtarch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010, Loughborough University - Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following 12 | * disclaimer in the documentation and/or other materials provided 13 | * with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote 15 | * products derived from this software without specific prior 16 | * written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 19 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 24 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | */ 31 | /* 32 | * \file 33 | * Stub header file for multi-threading. It doesn't do anything, it 34 | * just exists so that mt.c can compile cleanly. 35 | * 36 | * This is based on the original mtarch.h for z80 by Takahide Matsutsuka 37 | * 38 | * \author 39 | * George Oikonomou - 40 | */ 41 | #ifndef __MTARCH_H__ 42 | #define __MTARCH_H__ 43 | 44 | struct mtarch_thread { 45 | unsigned char *sp; 46 | }; 47 | 48 | #endif /* __MTARCH_H__ */ 49 | -------------------------------------------------------------------------------- /contiki/cpu/native/Makefile.native: -------------------------------------------------------------------------------- 1 | CONTIKI_CPU_DIRS = . net dev 2 | 3 | CONTIKI_SOURCEFILES += mtarch.c rtimer-arch.c elfloader-stub.c watchdog.c eeprom.c 4 | 5 | ### Compiler definitions 6 | CC ?= gcc 7 | ifdef LD_OVERRIDE 8 | LD = $(LD_OVERRIDE) 9 | else 10 | LD = gcc 11 | endif 12 | AS ?= as 13 | NM ?= nm 14 | OBJCOPY ?= objcopy 15 | STRIP ?= strip 16 | ifdef WERROR 17 | CFLAGSWERROR=-Werror 18 | endif 19 | CFLAGSNO = -Wall -g -I/usr/local/include $(CFLAGSWERROR) 20 | CFLAGS += $(CFLAGSNO) 21 | 22 | ifeq ($(HOST_OS),Darwin) 23 | AROPTS = -r 24 | LDFLAGS += -Wl,-flat_namespace 25 | CFLAGS += -DHAVE_SNPRINTF=1 -U__ASSERT_USE_STDERR 26 | else 27 | ifeq ($(HOST_OS),Linux) 28 | LDFLAGS += -Wl,-Map=contiki-$(TARGET).map,-export-dynamic 29 | endif 30 | endif 31 | 32 | ### Compilation rules 33 | 34 | %.so: $(OBJECTDIR)/%.o 35 | $(LD) -shared -o $@ $^ 36 | 37 | ifdef CORE 38 | .PHONY: symbols.c symbols.h 39 | symbols.c symbols.h: 40 | $(NM) -C $(CORE) | grep -v @ | grep -v dll_crt0 | awk -f $(CONTIKI)/tools/mknmlist > symbols.c 41 | else 42 | symbols.c symbols.h: 43 | cp ${CONTIKI}/tools/empty-symbols.c symbols.c 44 | cp ${CONTIKI}/tools/empty-symbols.h symbols.h 45 | endif 46 | 47 | contiki-$(TARGET).a: ${addprefix $(OBJECTDIR)/,symbols.o} 48 | -------------------------------------------------------------------------------- /contiki/cpu/native/dev/uart1.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copied from mc1322x/dev/cpu. 3 | 4 | This file exists as a work-around for the hardware dependant calls 5 | to slip_arch_init. 6 | 7 | Current the prototype for slip_arch_init is slip_arch_init(urb) 8 | 9 | and a typical call is something like 10 | slip_arch_init(BAUD2URB(115200)) 11 | 12 | BAUD2UBR is hardware specific, however. Furthermore, for the sky 13 | platform it's typically defined with #include "dev/uart1.h" (see 14 | rpl-boarder-router/slip-bridge.c), a sky specific file. dev/uart1.h 15 | includes msp430.h which includes the sky contiki-conf.h which 16 | defines BAUD2UBR. 17 | 18 | To me, the correct think to pass is simply the baudrate and have the 19 | hardware specific conversion happen inside slip_arch_init. 20 | 21 | Notably, most implementations just ignore the passed parameter 22 | anyway. (except AVR) 23 | 24 | */ 25 | 26 | #ifndef DEV_UART1_H 27 | #define DEV_UART1_H 28 | 29 | #define BAUD2UBR(x) x 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /contiki/cpu/native/mtarch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | * Author: Oliver Schmidt 32 | * 33 | */ 34 | 35 | #ifndef MTARCH_H_ 36 | #define MTARCH_H_ 37 | 38 | struct mtarch_thread { 39 | void *mt_thread; 40 | }; 41 | 42 | #endif /* MTARCH_H_ */ 43 | -------------------------------------------------------------------------------- /contiki/cpu/native/net/linuxradio-drv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, Google 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the Institute nor the names of its contributors 17 | * may be used to endorse or promote products derived from this software 18 | * without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 | * SUCH DAMAGE. 31 | * 32 | * Author: Vladimir Pouzanov 33 | * 34 | */ 35 | 36 | #ifndef __LINUXRADIO_DRV_H__ 37 | #define __LINUXRADIO_DRV_H__ 38 | 39 | #include "dev/radio.h" 40 | 41 | extern const struct radio_driver linuxradio_driver; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /contiki/cpu/native/net/tapdev-drv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Swedish Institute of Computer Science 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | 33 | #ifndef TAPDEV_DRV_H_ 34 | #define TAPDEV_DRV_H_ 35 | 36 | #include "contiki.h" 37 | 38 | PROCESS_NAME(tapdev_process); 39 | 40 | uint8_t tapdev_output(void); 41 | int tapdev_fd(void); 42 | 43 | #endif /* TAPDEV_DRV_H_ */ 44 | -------------------------------------------------------------------------------- /contiki/cpu/native/net/tapdev.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003, Adam Dunkels. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. All advertising materials mentioning features or use of this software 14 | * must display the following acknowledgement: 15 | * This product includes software developed by Adam Dunkels. 16 | * 4. The name of the author may not be used to endorse or promote 17 | * products derived from this software without specific prior 18 | * written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 21 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 26 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This file is part of the uIP TCP/IP stack. 33 | * 34 | */ 35 | 36 | #ifndef TAPDEV_H_ 37 | #define TAPDEV_H_ 38 | 39 | void tapdev_init(void); 40 | uint16_t tapdev_poll(void); 41 | void tapdev_send(void); 42 | void tapdev_exit(void); 43 | 44 | #endif /* TAPDEV_H_ */ 45 | -------------------------------------------------------------------------------- /contiki/cpu/native/net/tapdev6.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003, Adam Dunkels. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. All advertising materials mentioning features or use of this software 14 | * must display the following acknowledgement: 15 | * This product includes software developed by Adam Dunkels. 16 | * 4. The name of the author may not be used to endorse or promote 17 | * products derived from this software without specific prior 18 | * written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 21 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 26 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This file is part of the uIP TCP/IP stack. 33 | * 34 | * 35 | */ 36 | #ifndef TAPDEV_H_ 37 | #define TAPDEV_H_ 38 | 39 | #include "contiki-net.h" 40 | 41 | void tapdev_init(void); 42 | uint8_t tapdev_send(const uip_lladdr_t *lladdr); 43 | uint16_t tapdev_poll(void); 44 | void tapdev_do_send(void); 45 | void tapdev_exit(void); //math 46 | #endif /* TAPDEV_H_ */ 47 | -------------------------------------------------------------------------------- /contiki/cpu/native/net/wpcap-drv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | 33 | #ifndef WPCAP_DRV_H_ 34 | #define WPCAP_DRV_H_ 35 | 36 | #include "contiki.h" 37 | 38 | PROCESS_NAME(wpcap_process); 39 | 40 | uint8_t wpcap_output(void); 41 | 42 | #endif /* WPCAP_DRV_H_ */ 43 | -------------------------------------------------------------------------------- /contiki/cpu/native/rtimer-arch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the Contiki operating system. 30 | * 31 | */ 32 | 33 | /** 34 | * \file 35 | * A brief description of what this file is. 36 | * \author 37 | * Adam Dunkels 38 | */ 39 | 40 | #ifndef RTIMER_ARCH_H_ 41 | #define RTIMER_ARCH_H_ 42 | 43 | #include "contiki-conf.h" 44 | 45 | #define RTIMER_ARCH_SECOND CLOCK_CONF_SECOND 46 | 47 | #define rtimer_arch_now() clock_time() 48 | 49 | #endif /* RTIMER_ARCH_H_ */ 50 | -------------------------------------------------------------------------------- /contiki/examples/tr16-badge/Makefile: -------------------------------------------------------------------------------- 1 | CONTIKI_PROJECT = tr16-badge 2 | all: $(CONTIKI_PROJECT) 3 | 4 | CONTIKI = ../.. 5 | include $(CONTIKI)/Makefile.include 6 | 7 | ifdef GROUP 8 | CFLAGS+="-DGROUP='${GROUP}'" 9 | endif 10 | 11 | ifdef NAME 12 | CFLAGS+="-DNAME=\"${NAME}\"" 13 | endif 14 | 15 | ifdef FNAME 16 | CFLAGS+="-DFNAME=\"${FNAME}\"" 17 | endif 18 | 19 | ifdef TOKEN 20 | CFLAGS+="-DTOKEN=\"${TOKEN}\"" 21 | endif 22 | 23 | ifdef ID 24 | CFLAGS+="-DID=${ID}" 25 | endif 26 | -------------------------------------------------------------------------------- /contiki/examples/tr16-badge/Makefile.target: -------------------------------------------------------------------------------- 1 | TARGET = tr16-badge 2 | -------------------------------------------------------------------------------- /contiki/examples/tr16-badge/badgeName.h: -------------------------------------------------------------------------------- 1 | #ifndef __BADGE_NAME_H__ 2 | #define __BADGE_NAME_H__ 3 | 4 | #ifndef ID 5 | #define ID (123456) 6 | #endif 7 | #ifndef NAME 8 | #define NAME "No Identity" 9 | #endif 10 | #ifndef FNAME 11 | #define FNAME "No Identity" 12 | #endif 13 | #ifndef GROUP 14 | #define GROUP ('1') 15 | #endif 16 | #ifndef TOKEN 17 | #define TOKEN "XXXX-YYYY-XXXX-YYYYY-XXXX" 18 | #endif 19 | #define SAFE "YES" // hard coded safe status :-) 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /contiki/platform/tr16-badge/Makefile.tr16-badge: -------------------------------------------------------------------------------- 1 | # tr16-badge platform makefile 2 | 3 | ifndef CONTIKI 4 | $(error CONTIKI not defined! You must specify where CONTIKI resides!) 5 | endif 6 | 7 | ### Board and BSP selection 8 | ifeq ($(BOARD),) 9 | BOARD=badge/cc13xx 10 | endif 11 | 12 | CONTIKI_TARGET_DIRS += . 13 | 14 | ### Include the board-specific makefile 15 | PLATFORM_ROOT_DIR = $(CONTIKI)/platform/$(TARGET) 16 | -include $(PLATFORM_ROOT_DIR)/$(BOARD)/Makefile.$(notdir $(BOARD)) 17 | 18 | CONTIKI_TARGET_SOURCEFILES += contiki-main.c 19 | ### line below might be removed, as it's not needed /ski 20 | CONTIKI_TARGET_SOURCEFILES += sensors.c 21 | CONTIKI_TARGET_SOURCEFILES += $(BOARD_SOURCEFILES) 22 | 23 | CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) 24 | 25 | CLEAN += *.tr16-badge 26 | 27 | ### Unless the example dictates otherwise, build with code size optimisations 28 | ifndef SMALL 29 | SMALL = 0 30 | endif 31 | 32 | ### Define the CPU directory and pull in the correct CPU makefile. 33 | CONTIKI_CPU=$(CONTIKI)/cpu/cc26xx-cc13xx 34 | include $(CONTIKI_CPU)/Makefile.cc13xx 35 | 36 | MODULES += core/net core/net/mac core/net/mac/contikimac core/net/llsec 37 | -------------------------------------------------------------------------------- /contiki/platform/tr16-badge/badge/Makefile.badge: -------------------------------------------------------------------------------- 1 | CFLAGS += -DBOARD_SMARTRF06EB=1 2 | 3 | CONTIKI_TARGET_DIRS += badge 4 | 5 | BOARD_SOURCEFILES += badge-sensors.c button-sensor.c pwm.c board-spi.c board.c troopers_helpers.c troopers_rfc_settings.c troopers_rfc_cmd.c troopers_agenda.c eeprom.c troopers_eeprom.c font_7x12.c GraphicsLib.c lcd.c troopers_message_handling.c troopers_identity.c ADS7846.c 6 | 7 | PYTHON = python 8 | BSL_FLAGS += -e -w -v 9 | 10 | ifdef PORT 11 | BSL_FLAGS += -p $(PORT) 12 | endif 13 | 14 | BSL = $(CONTIKI)/tools/cc2538-bsl/cc2538-bsl.py 15 | 16 | %.upload: %.bin 17 | ifeq ($(wildcard $(BSL)), ) 18 | @echo "ERROR: Could not find the cc2538-bsl script. Did you run 'git submodule update --init' ?" 19 | else 20 | $(PYTHON) $(BSL) $(BSL_FLAGS) $< 21 | endif 22 | -------------------------------------------------------------------------------- /contiki/platform/tr16-badge/badge/cc13xx/Makefile.cc13xx: -------------------------------------------------------------------------------- 1 | ### Will allow the inclusion of the correct CPU makefile 2 | CPU_FAMILY = cc13xx 3 | 4 | ### Include the common sensortag makefile 5 | include $(PLATFORM_ROOT_DIR)/badge/Makefile.badge 6 | 7 | CONTIKI_TARGET_DIRS += badge/cc13xx 8 | -------------------------------------------------------------------------------- /contiki/platform/tr16-badge/badge/fonts.h: -------------------------------------------------------------------------------- 1 | #ifndef fonts_h 2 | #define fonts_h 3 | 4 | #if defined(__AVR__) 5 | # include 6 | #endif 7 | 8 | #include 9 | 10 | // All font data from Benedikt K. 11 | // http://www.mikrocontroller.net/topic/54860 12 | 13 | //Font selection (select only one font) 14 | //#define FONT_4X6 15 | //#define FONT_5X8 16 | //#define FONT_5X12 17 | //#define FONT_6X8 18 | //#define FONT_6X10 19 | #define FONT_7X12 20 | //#define FONT_8X8 21 | //#define FONT_8X12 22 | //#define FONT_8X14 23 | //#define FONT_10X16 24 | //#define FONT_12X16 25 | //#define FONT_12X20 26 | //#define FONT_16X26 27 | 28 | //if defined char range 0x20-0x7F otherwise 0x20-0xFF 29 | #define FONT_END7F 30 | 31 | #define FONT_START (0x20) //first character 32 | 33 | #if defined(FONT_4X6) 34 | # define FONT_WIDTH (4) 35 | # define FONT_HEIGHT (6) 36 | #elif defined(FONT_5X8) 37 | # define FONT_WIDTH (5) 38 | # define FONT_HEIGHT (8) 39 | #elif defined(FONT_5X12) 40 | # define FONT_WIDTH (5) 41 | # define FONT_HEIGHT (12) 42 | #elif defined(FONT_6X8) 43 | # define FONT_WIDTH (6) 44 | # define FONT_HEIGHT (8) 45 | #elif defined(FONT_6X10) 46 | # define FONT_WIDTH (6) 47 | # define FONT_HEIGHT (10) 48 | #elif defined(FONT_7X12) 49 | # define FONT_WIDTH (7) 50 | # define FONT_HEIGHT (12) 51 | #elif defined(FONT_8X8) 52 | # define FONT_WIDTH (8) 53 | # define FONT_HEIGHT (8) 54 | #elif defined(FONT_8X12) 55 | # define FONT_WIDTH (8) 56 | # define FONT_HEIGHT (12) 57 | #elif defined(FONT_8X14) 58 | # define FONT_WIDTH (8) 59 | # define FONT_HEIGHT (14) 60 | #elif defined(FONT_10X16) 61 | # define FONT_WIDTH (10) 62 | # define FONT_HEIGHT (16) 63 | #elif defined(FONT_12X16) 64 | # define FONT_WIDTH (12) 65 | # define FONT_HEIGHT (16) 66 | #elif defined(FONT_12X20) 67 | # define FONT_WIDTH (12) 68 | # define FONT_HEIGHT (20) 69 | #elif defined(FONT_16X26) 70 | # define FONT_WIDTH (16) 71 | # define FONT_HEIGHT (26) 72 | #else 73 | # warning No font defined 74 | #endif 75 | 76 | #if defined(__AVR__) 77 | extern const PROGMEM uint8_t font_PGM[]; 78 | #else 79 | extern const uint8_t font_PGM[]; 80 | #endif 81 | 82 | #endif //fonts_h 83 | -------------------------------------------------------------------------------- /contiki/platform/tr16-badge/badge/lcd.h: -------------------------------------------------------------------------------- 1 | #include "GraphicsLib.h" 2 | 3 | void wr_data16(uint16_t data); 4 | 5 | void setArea(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1); 6 | 7 | void invertDisplay(uint8_t invert); 8 | void wr_cmd(uint8_t cmd); 9 | void wr_data(uint8_t *data, size_t len); 10 | void wr_data_byte(uint8_t data); 11 | void lcdInit(void); 12 | void begin(); 13 | void led(int power); 14 | void drawStart(void); 15 | void draw(uint_least16_t color); 16 | void drawStop(void); 17 | void setOrientation(uint16_t o); 18 | 19 | 20 | void showContent(uint16_t fgColor, uint16_t bgColor); 21 | 22 | void vscrollInit(); 23 | void vscroll(); 24 | 25 | void displayText(int16_t x, int16_t y, const char* str); 26 | void displayScrollingText(uint8_t idx, int16_t y, const char* str); 27 | void disableScrollingText(uint8_t idx); 28 | -------------------------------------------------------------------------------- /contiki/platform/tr16-badge/badge/troopers_agenda.h: -------------------------------------------------------------------------------- 1 | #ifndef TROOPERS_AGENDA_H_ 2 | #define TROOPERS_AGENDA_H_ 3 | 4 | #include 5 | 6 | typedef enum { 7 | ATTACK, 8 | DEFENSE, 9 | SAP, 10 | EMBEDDED 11 | } track_t; 12 | 13 | typedef struct { 14 | uint8_t hour; 15 | uint8_t min; 16 | uint8_t day; 17 | } DayTime_t; 18 | 19 | typedef struct { 20 | uint8_t name[95]; 21 | //uint8_t speakers[65]; 22 | track_t track; 23 | } Event_t; 24 | 25 | typedef struct { 26 | Event_t track1; 27 | Event_t track2; 28 | Event_t track3; 29 | } Slot_t; 30 | 31 | void print_event(Event_t *ev); 32 | void print_slot(Slot_t *slot); 33 | 34 | void display_event(uint8_t idx, Event_t *ev); 35 | void display_slot(Slot_t *slot); 36 | 37 | extern Slot_t day1[8]; 38 | extern Slot_t day2[6]; 39 | 40 | void print_day(uint8_t day); 41 | void print_agenda(); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /contiki/platform/tr16-badge/badge/troopers_config.h: -------------------------------------------------------------------------------- 1 | #ifndef TROOPERS_CONFIG_H_ 2 | #define TROOPERS_CONFIG_H_ 3 | 4 | #include "rf-core/api/mailbox.h" 5 | #include "rf-core/api/common_cmd.h" 6 | #include "rf-core/api/data_entry.h" 7 | #include "rf-core/api/prop_mailbox.h" 8 | #include "rf-core/api/prop_cmd.h" 9 | 10 | // RF Core API commands 11 | extern rfc_CMD_PROP_RADIO_DIV_SETUP_t RF_cmdPropRadioDivSetup; 12 | extern rfc_CMD_FS_t RF_cmdFs; 13 | extern rfc_CMD_PROP_TX_t RF_cmdPropTx; 14 | extern rfc_CMD_PROP_RX_t RF_cmdPropRx; 15 | 16 | 17 | #define MESSAGELENGTH 100 18 | #define PACKETLENGTH 0x1E 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /contiki/platform/tr16-badge/badge/troopers_helpers.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include "troopers_helpers.h" 5 | 6 | void hexdump(const void *buffer, size_t size) 7 | { 8 | size_t i; 9 | uint8_t *ptr = (uint8_t *) buffer; 10 | 11 | for (i = 0; i < size; i++) { 12 | if (i && ((i & 3) == 0)) { 13 | printf(" "); 14 | } 15 | if (i % 16 == 0) { 16 | printf("\n"); 17 | } 18 | printf(" %02X", *ptr++); 19 | } 20 | printf(" [size=%02i]\n", size); 21 | } 22 | -------------------------------------------------------------------------------- /contiki/platform/tr16-badge/badge/troopers_helpers.h: -------------------------------------------------------------------------------- 1 | #ifndef TROOPERS_HELPERS_H_ 2 | #define TROOPERS_HELPERS_H_ 3 | 4 | void hexdump (const void *buffer, size_t size); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /contiki/platform/tr16-badge/badge/troopers_identity.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef TROOPERS_IDENTITY_H_ 3 | #define TROOPERS_IDENTITY_H_ 4 | 5 | void print_current_identity(uint8_t is_faked_menu); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /contiki/platform/tr16-badge/badge/troopers_message_handling.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __TROOPERS_MESSAGE_HANDLING_H__ 3 | #define __TROOPERS_MESSAGE_HANDLING_H__ 4 | 5 | #define DAY1_MAX_SLOTS 7 6 | #define DAY2_MAX_SLOTS 5 7 | #define INFO_TYPE_MAX_SLOTS 7 8 | #define MAX_ARBITRARY_MSG 29 9 | #define DEF_TIMEOUT 30 10 | 11 | 12 | int8_t check_and_parse_msg( 13 | const uint8_t *msg, 14 | uint8_t *info_type, 15 | uint8_t *slot, 16 | uint8_t *day); 17 | 18 | void output_arbitrary_message(uint8_t *data, uint16_t *length); 19 | 20 | void output_fix_messages( 21 | const uint8_t *info_type, 22 | const uint8_t *slot, 23 | const uint8_t *day, 24 | uint8_t *menu); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /contiki/platform/tr16-badge/badge/troopers_rfc_settings.h: -------------------------------------------------------------------------------- 1 | #ifndef TROOPERS_RFC_SETTINGS_H_ 2 | #define TROOPERS_RFC_SETTINGS_H_ 3 | 4 | /* 5 | 6 | Technical Reference S.1576 Proprietary Radio 7 | 8 | Commands: 9 | 10 | ID Command Name Supported Devices Description 11 | 0x3801 CMD_PROP_TX CC26xx, CC13xx Transmit packet 12 | 0x3802 CMD_PROP_RX CC26xx, CC13xx Receive packet or packets 13 | 0x3803 CMD_PROP_TX_ADV CC26xx, CC13xx Transmit packet with advanced modes 14 | 0x3804 CMD_PROP_RX_ADV CC26xx, CC13xx Receive packet or packets with advanced modes 15 | 0x3805 CMD_PROP_CS CC13xx Run carrier sense command 16 | 0x3806 CMD_PROP_RADIO_SETUP CC26xx Set up radio in proprietary mode 17 | 0x3807 CMD_PROP_RADIO_DIV_SETUP CC13xx Set up radio in proprietary mode for sub-1 GHz 18 | 19 | 20 | 0x3401 CMD_PROP_SET_LEN Set length of packet being received 21 | 0x3402 CMD_PROP_RESTART_RX Stop receiving a packet and go back to sync search 22 | 23 | Setting the packet-format: 24 | 25 | CMD_PROP_RX_ADV 26 | CMD_PROP_TX_ADV 27 | 28 | */ 29 | 30 | #include "rf-core/api/mailbox.h" 31 | #include "rf-core/api/common_cmd.h" 32 | #include "rf-core/api/prop_cmd.h" 33 | 34 | #define CMD_PROP_TX 0x3801 35 | #define CMD_PROP_RX 0x3802 36 | #define CMD_PROP_TX_ADV 0x3803 37 | #define CMD_PROP_RX_ADV 0x3804 38 | #define CMD_PROP_CS 0x3805 39 | #define CMD_PROP_RADIO_SETUP 0x3806 40 | #define CMD_PROP_RADIO_DIV_SETUP 0x3807 41 | 42 | extern rfc_CMD_PROP_RADIO_DIV_SETUP_t RF_cmdPropRadioDivSetup; 43 | extern rfc_CMD_FS_t RF_cmdFs; 44 | extern rfc_CMD_PROP_TX_t RF_cmdPropTx; 45 | extern rfc_CMD_PROP_RX_t RF_cmdPropRx; 46 | extern uint32_t pOverrides[]; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /flash: -------------------------------------------------------------------------------- 1 | source venv/bin/activate 2 | flasher.py -p /dev/ttyUSB0 -e -w -v contiki/examples/tr16-badge/tr16-badge.bin 3 | 4 | -------------------------------------------------------------------------------- /minirc.dfl: -------------------------------------------------------------------------------- 1 | # $Id: minirc.dfl,v 1.1.1.1 2003-03-30 18:55:39 al-guest Exp $ 2 | # Machine-generated file - use "minicom -s" to change parameters. 3 | pu addlinefeed No 4 | pu rtscts No 5 | pu addcarreturn Yes 6 | pu localecho Yes 7 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | python-magic 2 | pyserial 3 | --------------------------------------------------------------------------------