├── .gitignore ├── .gitmodules ├── LICENSE.md ├── Makefile ├── README.md ├── boards ├── gcp_iot_core_samd21.atsln ├── gcp_iot_core_samg55.atsln ├── gcp_iot_core_samw25.atsln ├── memory.txt ├── raspi │ ├── README.md │ ├── at_pubkey.py │ ├── at_token.py │ ├── cloudiot_mqtt_example.py │ └── requirements.txt ├── samd21 │ ├── Debug │ │ ├── Makefile │ │ ├── fan_control_samd21.bin │ │ ├── fan_control_samd21.eep │ │ ├── fan_control_samd21.lss │ │ ├── fan_control_samd21.srec │ │ └── makedep.mk │ ├── fan_control_samd21.componentinfo.xml │ ├── fan_control_samd21.cproj │ └── src │ │ ├── ASF │ │ ├── common │ │ │ ├── boards │ │ │ │ └── board.h │ │ │ ├── components │ │ │ │ └── wifi │ │ │ │ │ └── winc1500 │ │ │ │ │ ├── WINC1500_SW_API.chm │ │ │ │ │ ├── bsp │ │ │ │ │ ├── include │ │ │ │ │ │ ├── nm_bsp.h │ │ │ │ │ │ ├── nm_bsp_internal.h │ │ │ │ │ │ └── nm_bsp_samd21.h │ │ │ │ │ └── source │ │ │ │ │ │ └── nm_bsp_samd21.c │ │ │ │ │ ├── bus_wrapper │ │ │ │ │ ├── include │ │ │ │ │ │ └── nm_bus_wrapper.h │ │ │ │ │ └── source │ │ │ │ │ │ └── nm_bus_wrapper_samd21.c │ │ │ │ │ ├── common │ │ │ │ │ ├── include │ │ │ │ │ │ ├── nm_common.h │ │ │ │ │ │ └── nm_debug.h │ │ │ │ │ └── source │ │ │ │ │ │ └── nm_common.c │ │ │ │ │ ├── driver │ │ │ │ │ ├── include │ │ │ │ │ │ ├── ecc_types.h │ │ │ │ │ │ ├── m2m_ate_mode.h │ │ │ │ │ │ ├── m2m_crypto.h │ │ │ │ │ │ ├── m2m_ota.h │ │ │ │ │ │ ├── m2m_periph.h │ │ │ │ │ │ ├── m2m_ssl.h │ │ │ │ │ │ ├── m2m_types.h │ │ │ │ │ │ └── m2m_wifi.h │ │ │ │ │ └── source │ │ │ │ │ │ ├── m2m_ate_mode.c │ │ │ │ │ │ ├── m2m_crypto.c │ │ │ │ │ │ ├── m2m_hif.c │ │ │ │ │ │ ├── m2m_hif.h │ │ │ │ │ │ ├── m2m_ota.c │ │ │ │ │ │ ├── m2m_periph.c │ │ │ │ │ │ ├── m2m_ssl.c │ │ │ │ │ │ ├── m2m_wifi.c │ │ │ │ │ │ ├── nmasic.c │ │ │ │ │ │ ├── nmasic.h │ │ │ │ │ │ ├── nmbus.c │ │ │ │ │ │ ├── nmbus.h │ │ │ │ │ │ ├── nmdrv.c │ │ │ │ │ │ ├── nmdrv.h │ │ │ │ │ │ ├── nmi2c.c │ │ │ │ │ │ ├── nmi2c.h │ │ │ │ │ │ ├── nmspi.c │ │ │ │ │ │ ├── nmspi.h │ │ │ │ │ │ ├── nmuart.c │ │ │ │ │ │ └── nmuart.h │ │ │ │ │ ├── programmer │ │ │ │ │ ├── programmer.h │ │ │ │ │ └── programmer_apis.h │ │ │ │ │ ├── socket │ │ │ │ │ ├── include │ │ │ │ │ │ ├── m2m_socket_host_if.h │ │ │ │ │ │ └── socket.h │ │ │ │ │ └── source │ │ │ │ │ │ ├── socket.c │ │ │ │ │ │ └── socket_internal.h │ │ │ │ │ └── spi_flash │ │ │ │ │ ├── include │ │ │ │ │ ├── spi_flash.h │ │ │ │ │ └── spi_flash_map.h │ │ │ │ │ └── source │ │ │ │ │ └── spi_flash.c │ │ │ ├── services │ │ │ │ ├── serial │ │ │ │ │ ├── sam0_usart │ │ │ │ │ │ └── usart_serial.h │ │ │ │ │ └── serial.h │ │ │ │ ├── sleepmgr │ │ │ │ │ ├── samd │ │ │ │ │ │ ├── sleepmgr.c │ │ │ │ │ │ └── sleepmgr.h │ │ │ │ │ └── sleepmgr.h │ │ │ │ └── usb │ │ │ │ │ ├── class │ │ │ │ │ └── hid │ │ │ │ │ │ ├── device │ │ │ │ │ │ ├── generic │ │ │ │ │ │ │ ├── udi_hid_generic.c │ │ │ │ │ │ │ ├── udi_hid_generic.h │ │ │ │ │ │ │ ├── udi_hid_generic_conf.h │ │ │ │ │ │ │ └── udi_hid_generic_desc.c │ │ │ │ │ │ ├── udi_hid.c │ │ │ │ │ │ └── udi_hid.h │ │ │ │ │ │ └── usb_protocol_hid.h │ │ │ │ │ ├── udc │ │ │ │ │ ├── udc.c │ │ │ │ │ ├── udc.h │ │ │ │ │ ├── udc_desc.h │ │ │ │ │ ├── udd.h │ │ │ │ │ └── udi.h │ │ │ │ │ ├── usb_atmel.h │ │ │ │ │ └── usb_protocol.h │ │ │ └── utils │ │ │ │ ├── interrupt.h │ │ │ │ ├── interrupt │ │ │ │ ├── interrupt_sam_nvic.c │ │ │ │ └── interrupt_sam_nvic.h │ │ │ │ └── parts.h │ │ ├── common2 │ │ │ └── services │ │ │ │ └── delay │ │ │ │ ├── delay.h │ │ │ │ └── sam0 │ │ │ │ ├── systick_counter.c │ │ │ │ └── systick_counter.h │ │ ├── sam0 │ │ │ ├── boards │ │ │ │ └── samd21_xplained_pro │ │ │ │ │ ├── board_init.c │ │ │ │ │ └── samd21_xplained_pro.h │ │ │ ├── drivers │ │ │ │ ├── extint │ │ │ │ │ ├── extint.h │ │ │ │ │ ├── extint_callback.c │ │ │ │ │ ├── extint_callback.h │ │ │ │ │ └── extint_sam_d_r_h │ │ │ │ │ │ └── extint.c │ │ │ │ ├── port │ │ │ │ │ ├── port.c │ │ │ │ │ ├── port.h │ │ │ │ │ └── quick_start │ │ │ │ │ │ └── qs_port_basic.h │ │ │ │ ├── rtc │ │ │ │ │ ├── rtc_count.h │ │ │ │ │ ├── rtc_sam_d_r_h │ │ │ │ │ │ └── rtc_count.c │ │ │ │ │ └── rtc_tamper.h │ │ │ │ ├── sercom │ │ │ │ │ ├── i2c │ │ │ │ │ │ ├── i2c_common.h │ │ │ │ │ │ ├── i2c_master.h │ │ │ │ │ │ ├── i2c_sam0 │ │ │ │ │ │ │ └── i2c_master.c │ │ │ │ │ │ ├── quick_start_master │ │ │ │ │ │ │ └── qs_i2c_master_basic_use.h │ │ │ │ │ │ └── quick_start_master_dma │ │ │ │ │ │ │ └── qs_i2c_master_dma.h │ │ │ │ │ ├── sercom.c │ │ │ │ │ ├── sercom.h │ │ │ │ │ ├── sercom_interrupt.c │ │ │ │ │ ├── sercom_interrupt.h │ │ │ │ │ ├── sercom_pinout.h │ │ │ │ │ ├── spi │ │ │ │ │ │ ├── quick_start_dma │ │ │ │ │ │ │ └── qs_spi_dma_use.h │ │ │ │ │ │ ├── quick_start_master │ │ │ │ │ │ │ └── qs_spi_master_basic.h │ │ │ │ │ │ ├── quick_start_master_callback │ │ │ │ │ │ │ └── qs_spi_master_callback.h │ │ │ │ │ │ ├── quick_start_slave │ │ │ │ │ │ │ └── qs_spi_slave_basic.h │ │ │ │ │ │ ├── quick_start_slave_callback │ │ │ │ │ │ │ └── qs_spi_slave_callback.h │ │ │ │ │ │ ├── spi.c │ │ │ │ │ │ ├── spi.h │ │ │ │ │ │ ├── spi_interrupt.c │ │ │ │ │ │ └── spi_interrupt.h │ │ │ │ │ └── usart │ │ │ │ │ │ ├── quick_start │ │ │ │ │ │ └── qs_usart_basic_use.h │ │ │ │ │ │ ├── quick_start_callback │ │ │ │ │ │ └── qs_usart_callback.h │ │ │ │ │ │ ├── quick_start_dma │ │ │ │ │ │ └── qs_usart_dma_use.h │ │ │ │ │ │ ├── quick_start_lin │ │ │ │ │ │ └── qs_lin.h │ │ │ │ │ │ ├── usart.c │ │ │ │ │ │ ├── usart.h │ │ │ │ │ │ ├── usart_interrupt.c │ │ │ │ │ │ └── usart_interrupt.h │ │ │ │ ├── system │ │ │ │ │ ├── clock │ │ │ │ │ │ ├── clock.h │ │ │ │ │ │ ├── clock_samd21_r21_da_ha1 │ │ │ │ │ │ │ ├── clock.c │ │ │ │ │ │ │ ├── clock_config_check.h │ │ │ │ │ │ │ ├── clock_feature.h │ │ │ │ │ │ │ └── gclk.c │ │ │ │ │ │ └── gclk.h │ │ │ │ │ ├── interrupt │ │ │ │ │ │ ├── system_interrupt.c │ │ │ │ │ │ ├── system_interrupt.h │ │ │ │ │ │ └── system_interrupt_samd21 │ │ │ │ │ │ │ └── system_interrupt_features.h │ │ │ │ │ ├── pinmux │ │ │ │ │ │ ├── pinmux.c │ │ │ │ │ │ ├── pinmux.h │ │ │ │ │ │ └── quick_start │ │ │ │ │ │ │ └── qs_pinmux_basic.h │ │ │ │ │ ├── power │ │ │ │ │ │ └── power_sam_d_r_h │ │ │ │ │ │ │ └── power.h │ │ │ │ │ ├── reset │ │ │ │ │ │ └── reset_sam_d_r_h │ │ │ │ │ │ │ └── reset.h │ │ │ │ │ ├── system.c │ │ │ │ │ └── system.h │ │ │ │ ├── tc │ │ │ │ │ ├── tc.h │ │ │ │ │ ├── tc_interrupt.c │ │ │ │ │ ├── tc_interrupt.h │ │ │ │ │ └── tc_sam_d_r_h │ │ │ │ │ │ └── tc.c │ │ │ │ └── usb │ │ │ │ │ ├── stack_interface │ │ │ │ │ ├── usb_device_udd.c │ │ │ │ │ ├── usb_dual.c │ │ │ │ │ └── usb_dual.h │ │ │ │ │ ├── usb.h │ │ │ │ │ └── usb_sam_d_r │ │ │ │ │ └── usb.c │ │ │ └── utils │ │ │ │ ├── cmsis │ │ │ │ └── samd21 │ │ │ │ │ ├── include │ │ │ │ │ ├── component │ │ │ │ │ │ ├── ac.h │ │ │ │ │ │ ├── adc.h │ │ │ │ │ │ ├── dac.h │ │ │ │ │ │ ├── dmac.h │ │ │ │ │ │ ├── dsu.h │ │ │ │ │ │ ├── eic.h │ │ │ │ │ │ ├── evsys.h │ │ │ │ │ │ ├── gclk.h │ │ │ │ │ │ ├── hmatrixb.h │ │ │ │ │ │ ├── i2s.h │ │ │ │ │ │ ├── mtb.h │ │ │ │ │ │ ├── nvmctrl.h │ │ │ │ │ │ ├── pac.h │ │ │ │ │ │ ├── pm.h │ │ │ │ │ │ ├── port.h │ │ │ │ │ │ ├── rtc.h │ │ │ │ │ │ ├── sercom.h │ │ │ │ │ │ ├── sysctrl.h │ │ │ │ │ │ ├── tc.h │ │ │ │ │ │ ├── tcc.h │ │ │ │ │ │ ├── tcc_lighting.h │ │ │ │ │ │ ├── usb.h │ │ │ │ │ │ └── wdt.h │ │ │ │ │ ├── instance │ │ │ │ │ │ ├── ac.h │ │ │ │ │ │ ├── ac1.h │ │ │ │ │ │ ├── adc.h │ │ │ │ │ │ ├── dac.h │ │ │ │ │ │ ├── dmac.h │ │ │ │ │ │ ├── dsu.h │ │ │ │ │ │ ├── eic.h │ │ │ │ │ │ ├── evsys.h │ │ │ │ │ │ ├── gclk.h │ │ │ │ │ │ ├── i2s.h │ │ │ │ │ │ ├── mtb.h │ │ │ │ │ │ ├── nvmctrl.h │ │ │ │ │ │ ├── pac0.h │ │ │ │ │ │ ├── pac1.h │ │ │ │ │ │ ├── pac2.h │ │ │ │ │ │ ├── pm.h │ │ │ │ │ │ ├── port.h │ │ │ │ │ │ ├── rtc.h │ │ │ │ │ │ ├── sbmatrix.h │ │ │ │ │ │ ├── sercom0.h │ │ │ │ │ │ ├── sercom1.h │ │ │ │ │ │ ├── sercom2.h │ │ │ │ │ │ ├── sercom3.h │ │ │ │ │ │ ├── sercom4.h │ │ │ │ │ │ ├── sercom5.h │ │ │ │ │ │ ├── sysctrl.h │ │ │ │ │ │ ├── tc3.h │ │ │ │ │ │ ├── tc4.h │ │ │ │ │ │ ├── tc5.h │ │ │ │ │ │ ├── tc6.h │ │ │ │ │ │ ├── tc7.h │ │ │ │ │ │ ├── tcc0.h │ │ │ │ │ │ ├── tcc1.h │ │ │ │ │ │ ├── tcc2.h │ │ │ │ │ │ ├── usb.h │ │ │ │ │ │ └── wdt.h │ │ │ │ │ ├── pio │ │ │ │ │ │ ├── samd21e15a.h │ │ │ │ │ │ ├── samd21e15b.h │ │ │ │ │ │ ├── samd21e15bu.h │ │ │ │ │ │ ├── samd21e15l.h │ │ │ │ │ │ ├── samd21e16a.h │ │ │ │ │ │ ├── samd21e16b.h │ │ │ │ │ │ ├── samd21e16bu.h │ │ │ │ │ │ ├── samd21e16l.h │ │ │ │ │ │ ├── samd21e17a.h │ │ │ │ │ │ ├── samd21e18a.h │ │ │ │ │ │ ├── samd21g15a.h │ │ │ │ │ │ ├── samd21g15b.h │ │ │ │ │ │ ├── samd21g15l.h │ │ │ │ │ │ ├── samd21g16a.h │ │ │ │ │ │ ├── samd21g16b.h │ │ │ │ │ │ ├── samd21g16l.h │ │ │ │ │ │ ├── samd21g17a.h │ │ │ │ │ │ ├── samd21g17au.h │ │ │ │ │ │ ├── samd21g18a.h │ │ │ │ │ │ ├── samd21g18au.h │ │ │ │ │ │ ├── samd21j15a.h │ │ │ │ │ │ ├── samd21j15b.h │ │ │ │ │ │ ├── samd21j16a.h │ │ │ │ │ │ ├── samd21j16b.h │ │ │ │ │ │ ├── samd21j17a.h │ │ │ │ │ │ └── samd21j18a.h │ │ │ │ │ ├── samd21.h │ │ │ │ │ ├── samd21e15a.h │ │ │ │ │ ├── samd21e15b.h │ │ │ │ │ ├── samd21e15bu.h │ │ │ │ │ ├── samd21e15l.h │ │ │ │ │ ├── samd21e16a.h │ │ │ │ │ ├── samd21e16b.h │ │ │ │ │ ├── samd21e16bu.h │ │ │ │ │ ├── samd21e16l.h │ │ │ │ │ ├── samd21e17a.h │ │ │ │ │ ├── samd21e18a.h │ │ │ │ │ ├── samd21g15a.h │ │ │ │ │ ├── samd21g15b.h │ │ │ │ │ ├── samd21g15l.h │ │ │ │ │ ├── samd21g16a.h │ │ │ │ │ ├── samd21g16b.h │ │ │ │ │ ├── samd21g16l.h │ │ │ │ │ ├── samd21g17a.h │ │ │ │ │ ├── samd21g17au.h │ │ │ │ │ ├── samd21g18a.h │ │ │ │ │ ├── samd21g18au.h │ │ │ │ │ ├── samd21j15a.h │ │ │ │ │ ├── samd21j15b.h │ │ │ │ │ ├── samd21j16a.h │ │ │ │ │ ├── samd21j16b.h │ │ │ │ │ ├── samd21j17a.h │ │ │ │ │ └── samd21j18a.h │ │ │ │ │ └── source │ │ │ │ │ ├── gcc │ │ │ │ │ └── startup_samd21.c │ │ │ │ │ ├── system_samd21.c │ │ │ │ │ └── system_samd21.h │ │ │ │ ├── compiler.h │ │ │ │ ├── header_files │ │ │ │ └── io.h │ │ │ │ ├── linker_scripts │ │ │ │ └── samd21 │ │ │ │ │ └── gcc │ │ │ │ │ └── samd21j18a_flash.ld │ │ │ │ ├── make │ │ │ │ └── Makefile.sam.in │ │ │ │ ├── preprocessor │ │ │ │ ├── mrecursion.h │ │ │ │ ├── mrepeat.h │ │ │ │ ├── preprocessor.h │ │ │ │ ├── stringz.h │ │ │ │ └── tpaste.h │ │ │ │ ├── status_codes.h │ │ │ │ ├── stdio │ │ │ │ ├── read.c │ │ │ │ ├── stdio_serial │ │ │ │ │ └── stdio_serial.h │ │ │ │ └── write.c │ │ │ │ └── syscalls │ │ │ │ └── gcc │ │ │ │ └── syscalls.c │ │ └── thirdparty │ │ │ └── CMSIS │ │ │ ├── ATMEL-disclaimer.txt │ │ │ ├── CMSIS_END_USER_LICENCE_AGREEMENT.pdf │ │ │ ├── Include │ │ │ ├── arm_math.h │ │ │ ├── core_cm0plus.h │ │ │ ├── core_cmFunc.h │ │ │ └── core_cmInstr.h │ │ │ ├── Lib │ │ │ ├── GCC │ │ │ │ └── libarm_cortexM0l_math.a │ │ │ └── license.txt │ │ │ └── README.txt │ │ ├── asf.h │ │ └── config │ │ ├── conf_board.h │ │ ├── conf_clocks.h │ │ ├── conf_extint.h │ │ ├── conf_sleepmgr.h │ │ ├── conf_spi.h │ │ ├── conf_usb.h │ │ └── conf_winc.h ├── samg55 │ ├── gcp_iot_core_samg55.componentinfo.xml │ ├── gcp_iot_core_samg55.cproj │ └── src │ │ ├── ASF │ │ ├── common │ │ │ ├── boards │ │ │ │ └── board.h │ │ │ ├── components │ │ │ │ └── wifi │ │ │ │ │ └── winc1500 │ │ │ │ │ ├── WINC1500_SW_API.chm │ │ │ │ │ ├── bsp │ │ │ │ │ ├── include │ │ │ │ │ │ ├── nm_bsp.h │ │ │ │ │ │ ├── nm_bsp_internal.h │ │ │ │ │ │ └── nm_bsp_samg55.h │ │ │ │ │ └── source │ │ │ │ │ │ └── nm_bsp_samg55.c │ │ │ │ │ ├── bus_wrapper │ │ │ │ │ ├── include │ │ │ │ │ │ └── nm_bus_wrapper.h │ │ │ │ │ └── source │ │ │ │ │ │ └── nm_bus_wrapper_samg55.c │ │ │ │ │ ├── common │ │ │ │ │ ├── include │ │ │ │ │ │ ├── nm_common.h │ │ │ │ │ │ └── nm_debug.h │ │ │ │ │ └── source │ │ │ │ │ │ └── nm_common.c │ │ │ │ │ ├── driver │ │ │ │ │ ├── include │ │ │ │ │ │ ├── ecc_types.h │ │ │ │ │ │ ├── m2m_ate_mode.h │ │ │ │ │ │ ├── m2m_crypto.h │ │ │ │ │ │ ├── m2m_ota.h │ │ │ │ │ │ ├── m2m_periph.h │ │ │ │ │ │ ├── m2m_ssl.h │ │ │ │ │ │ ├── m2m_types.h │ │ │ │ │ │ └── m2m_wifi.h │ │ │ │ │ └── source │ │ │ │ │ │ ├── m2m_ate_mode.c │ │ │ │ │ │ ├── m2m_crypto.c │ │ │ │ │ │ ├── m2m_hif.c │ │ │ │ │ │ ├── m2m_hif.h │ │ │ │ │ │ ├── m2m_ota.c │ │ │ │ │ │ ├── m2m_periph.c │ │ │ │ │ │ ├── m2m_ssl.c │ │ │ │ │ │ ├── m2m_wifi.c │ │ │ │ │ │ ├── nmasic.c │ │ │ │ │ │ ├── nmasic.h │ │ │ │ │ │ ├── nmbus.c │ │ │ │ │ │ ├── nmbus.h │ │ │ │ │ │ ├── nmdrv.c │ │ │ │ │ │ ├── nmdrv.h │ │ │ │ │ │ ├── nmi2c.c │ │ │ │ │ │ ├── nmi2c.h │ │ │ │ │ │ ├── nmspi.c │ │ │ │ │ │ ├── nmspi.h │ │ │ │ │ │ ├── nmuart.c │ │ │ │ │ │ └── nmuart.h │ │ │ │ │ ├── programmer │ │ │ │ │ ├── programmer.h │ │ │ │ │ └── programmer_apis.h │ │ │ │ │ ├── socket │ │ │ │ │ ├── include │ │ │ │ │ │ ├── m2m_socket_host_if.h │ │ │ │ │ │ └── socket.h │ │ │ │ │ └── source │ │ │ │ │ │ ├── socket.c │ │ │ │ │ │ └── socket_internal.h │ │ │ │ │ └── spi_flash │ │ │ │ │ ├── include │ │ │ │ │ ├── spi_flash.h │ │ │ │ │ └── spi_flash_map.h │ │ │ │ │ └── source │ │ │ │ │ └── spi_flash.c │ │ │ ├── services │ │ │ │ ├── clock │ │ │ │ │ ├── genclk.h │ │ │ │ │ ├── osc.h │ │ │ │ │ ├── pll.h │ │ │ │ │ ├── samg │ │ │ │ │ │ ├── genclk.h │ │ │ │ │ │ ├── osc.h │ │ │ │ │ │ ├── pll.h │ │ │ │ │ │ ├── sysclk.c │ │ │ │ │ │ └── sysclk.h │ │ │ │ │ └── sysclk.h │ │ │ │ ├── delay │ │ │ │ │ ├── delay.h │ │ │ │ │ └── sam │ │ │ │ │ │ ├── cycle_counter.c │ │ │ │ │ │ └── cycle_counter.h │ │ │ │ ├── ioport │ │ │ │ │ ├── ioport.h │ │ │ │ │ └── sam │ │ │ │ │ │ └── ioport_pio.h │ │ │ │ ├── serial │ │ │ │ │ ├── sam_uart │ │ │ │ │ │ └── uart_serial.h │ │ │ │ │ ├── serial.h │ │ │ │ │ └── usart_serial.c │ │ │ │ ├── sleepmgr │ │ │ │ │ ├── sam │ │ │ │ │ │ ├── sleepmgr.c │ │ │ │ │ │ └── sleepmgr.h │ │ │ │ │ └── sleepmgr.h │ │ │ │ ├── twi │ │ │ │ │ ├── sam_twi │ │ │ │ │ │ ├── twi_master.h │ │ │ │ │ │ └── twi_slave.h │ │ │ │ │ ├── twi_master.h │ │ │ │ │ └── twi_slave.h │ │ │ │ └── usb │ │ │ │ │ ├── class │ │ │ │ │ └── hid │ │ │ │ │ │ ├── device │ │ │ │ │ │ ├── generic │ │ │ │ │ │ │ ├── udi_hid_generic.c │ │ │ │ │ │ │ ├── udi_hid_generic.h │ │ │ │ │ │ │ ├── udi_hid_generic_conf.h │ │ │ │ │ │ │ └── udi_hid_generic_desc.c │ │ │ │ │ │ ├── udi_hid.c │ │ │ │ │ │ └── udi_hid.h │ │ │ │ │ │ └── usb_protocol_hid.h │ │ │ │ │ ├── udc │ │ │ │ │ ├── udc.c │ │ │ │ │ ├── udc.h │ │ │ │ │ ├── udc_desc.h │ │ │ │ │ ├── udd.h │ │ │ │ │ └── udi.h │ │ │ │ │ ├── usb_atmel.h │ │ │ │ │ └── usb_protocol.h │ │ │ └── utils │ │ │ │ ├── interrupt.h │ │ │ │ ├── interrupt │ │ │ │ ├── interrupt_sam_nvic.c │ │ │ │ └── interrupt_sam_nvic.h │ │ │ │ ├── parts.h │ │ │ │ └── stdio │ │ │ │ ├── read.c │ │ │ │ ├── stdio_serial │ │ │ │ └── stdio_serial.h │ │ │ │ └── write.c │ │ ├── sam │ │ │ ├── boards │ │ │ │ └── samg55_xplained_pro │ │ │ │ │ ├── board_init.c │ │ │ │ │ ├── led.h │ │ │ │ │ └── samg55_xplained_pro.h │ │ │ ├── drivers │ │ │ │ ├── efc │ │ │ │ │ ├── efc.c │ │ │ │ │ └── efc.h │ │ │ │ ├── flexcom │ │ │ │ │ ├── flexcom.c │ │ │ │ │ └── flexcom.h │ │ │ │ ├── matrix │ │ │ │ │ ├── matrix.c │ │ │ │ │ └── matrix.h │ │ │ │ ├── pdc │ │ │ │ │ ├── pdc.c │ │ │ │ │ ├── pdc.h │ │ │ │ │ └── pdc_uart_example │ │ │ │ │ │ └── pdc_uart_example.h │ │ │ │ ├── pio │ │ │ │ │ ├── pio.c │ │ │ │ │ ├── pio.h │ │ │ │ │ ├── pio_handler.c │ │ │ │ │ └── pio_handler.h │ │ │ │ ├── pmc │ │ │ │ │ ├── pmc.c │ │ │ │ │ ├── pmc.h │ │ │ │ │ ├── sleep.c │ │ │ │ │ └── sleep.h │ │ │ │ ├── rtc │ │ │ │ │ ├── rtc.c │ │ │ │ │ └── rtc.h │ │ │ │ ├── spi │ │ │ │ │ ├── spi.c │ │ │ │ │ └── spi.h │ │ │ │ ├── supc │ │ │ │ │ ├── supc.c │ │ │ │ │ └── supc.h │ │ │ │ ├── tc │ │ │ │ │ ├── tc.c │ │ │ │ │ ├── tc.h │ │ │ │ │ └── tc_capture_waveform_example │ │ │ │ │ │ └── tc_capture_waveform_example.h │ │ │ │ ├── twi │ │ │ │ │ ├── twi.c │ │ │ │ │ └── twi.h │ │ │ │ ├── udp │ │ │ │ │ ├── udp_device.c │ │ │ │ │ └── udp_device.h │ │ │ │ └── usart │ │ │ │ │ ├── usart.c │ │ │ │ │ └── usart.h │ │ │ └── utils │ │ │ │ ├── cmsis │ │ │ │ └── samg │ │ │ │ │ └── samg55 │ │ │ │ │ ├── include │ │ │ │ │ ├── component │ │ │ │ │ │ ├── adc.h │ │ │ │ │ │ ├── chipid.h │ │ │ │ │ │ ├── cmcc.h │ │ │ │ │ │ ├── crccu.h │ │ │ │ │ │ ├── efc.h │ │ │ │ │ │ ├── flexcom.h │ │ │ │ │ │ ├── gpbr.h │ │ │ │ │ │ ├── i2sc.h │ │ │ │ │ │ ├── matrix.h │ │ │ │ │ │ ├── mem2mem.h │ │ │ │ │ │ ├── pdc.h │ │ │ │ │ │ ├── pdmic.h │ │ │ │ │ │ ├── pio.h │ │ │ │ │ │ ├── pmc.h │ │ │ │ │ │ ├── rstc.h │ │ │ │ │ │ ├── rtc.h │ │ │ │ │ │ ├── rtt.h │ │ │ │ │ │ ├── spi.h │ │ │ │ │ │ ├── supc.h │ │ │ │ │ │ ├── tc.h │ │ │ │ │ │ ├── twi.h │ │ │ │ │ │ ├── udp.h │ │ │ │ │ │ ├── uhp.h │ │ │ │ │ │ ├── usart.h │ │ │ │ │ │ └── wdt.h │ │ │ │ │ ├── instance │ │ │ │ │ │ ├── adc.h │ │ │ │ │ │ ├── chipid.h │ │ │ │ │ │ ├── cmcc.h │ │ │ │ │ │ ├── crccu.h │ │ │ │ │ │ ├── efc.h │ │ │ │ │ │ ├── flexcom0.h │ │ │ │ │ │ ├── flexcom1.h │ │ │ │ │ │ ├── flexcom2.h │ │ │ │ │ │ ├── flexcom3.h │ │ │ │ │ │ ├── flexcom4.h │ │ │ │ │ │ ├── flexcom5.h │ │ │ │ │ │ ├── flexcom6.h │ │ │ │ │ │ ├── flexcom7.h │ │ │ │ │ │ ├── gpbr.h │ │ │ │ │ │ ├── i2sc0.h │ │ │ │ │ │ ├── i2sc1.h │ │ │ │ │ │ ├── matrix.h │ │ │ │ │ │ ├── mem2mem.h │ │ │ │ │ │ ├── pdmic0.h │ │ │ │ │ │ ├── pdmic1.h │ │ │ │ │ │ ├── pioa.h │ │ │ │ │ │ ├── piob.h │ │ │ │ │ │ ├── pmc.h │ │ │ │ │ │ ├── rstc.h │ │ │ │ │ │ ├── rtc.h │ │ │ │ │ │ ├── rtt.h │ │ │ │ │ │ ├── spi0.h │ │ │ │ │ │ ├── spi1.h │ │ │ │ │ │ ├── spi2.h │ │ │ │ │ │ ├── spi3.h │ │ │ │ │ │ ├── spi4.h │ │ │ │ │ │ ├── spi5.h │ │ │ │ │ │ ├── spi6.h │ │ │ │ │ │ ├── spi7.h │ │ │ │ │ │ ├── supc.h │ │ │ │ │ │ ├── tc0.h │ │ │ │ │ │ ├── tc1.h │ │ │ │ │ │ ├── twi0.h │ │ │ │ │ │ ├── twi1.h │ │ │ │ │ │ ├── twi2.h │ │ │ │ │ │ ├── twi3.h │ │ │ │ │ │ ├── twi4.h │ │ │ │ │ │ ├── twi5.h │ │ │ │ │ │ ├── twi6.h │ │ │ │ │ │ ├── twi7.h │ │ │ │ │ │ ├── udp.h │ │ │ │ │ │ ├── uhp.h │ │ │ │ │ │ ├── usart0.h │ │ │ │ │ │ ├── usart1.h │ │ │ │ │ │ ├── usart2.h │ │ │ │ │ │ ├── usart3.h │ │ │ │ │ │ ├── usart4.h │ │ │ │ │ │ ├── usart5.h │ │ │ │ │ │ ├── usart6.h │ │ │ │ │ │ ├── usart7.h │ │ │ │ │ │ └── wdt.h │ │ │ │ │ ├── pio │ │ │ │ │ │ ├── samg55g18.h │ │ │ │ │ │ ├── samg55g19.h │ │ │ │ │ │ ├── samg55j18.h │ │ │ │ │ │ ├── samg55j19.h │ │ │ │ │ │ └── samg55n19.h │ │ │ │ │ ├── samg55.h │ │ │ │ │ ├── samg55g18.h │ │ │ │ │ ├── samg55g19.h │ │ │ │ │ ├── samg55j18.h │ │ │ │ │ ├── samg55j19.h │ │ │ │ │ ├── samg55n19.h │ │ │ │ │ └── system_samg55.h │ │ │ │ │ └── source │ │ │ │ │ └── templates │ │ │ │ │ ├── gcc │ │ │ │ │ └── startup_samg55.c │ │ │ │ │ └── system_samg55.c │ │ │ │ ├── compiler.h │ │ │ │ ├── fpu │ │ │ │ └── fpu.h │ │ │ │ ├── header_files │ │ │ │ └── io.h │ │ │ │ ├── linker_scripts │ │ │ │ └── samg │ │ │ │ │ └── samg55j19 │ │ │ │ │ └── gcc │ │ │ │ │ └── flash.ld │ │ │ │ ├── make │ │ │ │ └── Makefile.sam.in │ │ │ │ ├── preprocessor │ │ │ │ ├── mrepeat.h │ │ │ │ ├── preprocessor.h │ │ │ │ ├── stringz.h │ │ │ │ └── tpaste.h │ │ │ │ ├── status_codes.h │ │ │ │ └── syscalls │ │ │ │ └── gcc │ │ │ │ └── syscalls.c │ │ └── thirdparty │ │ │ └── CMSIS │ │ │ ├── ATMEL-disclaimer.txt │ │ │ ├── CMSIS_END_USER_LICENCE_AGREEMENT.pdf │ │ │ ├── Include │ │ │ ├── arm_common_tables.h │ │ │ ├── arm_const_structs.h │ │ │ ├── arm_math.h │ │ │ ├── core_cm4.h │ │ │ ├── core_cmFunc.h │ │ │ ├── core_cmInstr.h │ │ │ └── core_cmSimd.h │ │ │ ├── Lib │ │ │ ├── GCC │ │ │ │ ├── libarm_cortexM4lf_math.a │ │ │ │ └── libarm_cortexM4lf_math_softfp.a │ │ │ └── license.txt │ │ │ └── README.txt │ │ ├── asf.h │ │ └── config │ │ ├── conf_board.h │ │ ├── conf_clock.h │ │ ├── conf_sleepmgr.h │ │ ├── conf_uart_serial.h │ │ ├── conf_usb.h │ │ └── conf_winc.h └── samw25 │ ├── fan_control_samw25.componentinfo.xml │ ├── fan_control_samw25.cproj │ └── src │ ├── ASF │ ├── common │ │ ├── boards │ │ │ └── board.h │ │ ├── components │ │ │ └── wifi │ │ │ │ └── winc1500 │ │ │ │ ├── WINC1500_SW_API.chm │ │ │ │ ├── bsp │ │ │ │ ├── include │ │ │ │ │ ├── nm_bsp.h │ │ │ │ │ ├── nm_bsp_internal.h │ │ │ │ │ └── nm_bsp_samd21.h │ │ │ │ └── source │ │ │ │ │ └── nm_bsp_samd21.c │ │ │ │ ├── bus_wrapper │ │ │ │ ├── include │ │ │ │ │ └── nm_bus_wrapper.h │ │ │ │ └── source │ │ │ │ │ └── nm_bus_wrapper_samd21.c │ │ │ │ ├── common │ │ │ │ ├── include │ │ │ │ │ ├── nm_common.h │ │ │ │ │ └── nm_debug.h │ │ │ │ └── source │ │ │ │ │ └── nm_common.c │ │ │ │ ├── driver │ │ │ │ ├── include │ │ │ │ │ ├── ecc_types.h │ │ │ │ │ ├── m2m_ate_mode.h │ │ │ │ │ ├── m2m_crypto.h │ │ │ │ │ ├── m2m_ota.h │ │ │ │ │ ├── m2m_periph.h │ │ │ │ │ ├── m2m_ssl.h │ │ │ │ │ ├── m2m_types.h │ │ │ │ │ └── m2m_wifi.h │ │ │ │ └── source │ │ │ │ │ ├── m2m_ate_mode.c │ │ │ │ │ ├── m2m_crypto.c │ │ │ │ │ ├── m2m_hif.c │ │ │ │ │ ├── m2m_hif.h │ │ │ │ │ ├── m2m_ota.c │ │ │ │ │ ├── m2m_periph.c │ │ │ │ │ ├── m2m_ssl.c │ │ │ │ │ ├── m2m_wifi.c │ │ │ │ │ ├── nmasic.c │ │ │ │ │ ├── nmasic.h │ │ │ │ │ ├── nmbus.c │ │ │ │ │ ├── nmbus.h │ │ │ │ │ ├── nmdrv.c │ │ │ │ │ ├── nmdrv.h │ │ │ │ │ ├── nmi2c.c │ │ │ │ │ ├── nmi2c.h │ │ │ │ │ ├── nmspi.c │ │ │ │ │ ├── nmspi.h │ │ │ │ │ ├── nmuart.c │ │ │ │ │ └── nmuart.h │ │ │ │ ├── programmer │ │ │ │ ├── programmer.h │ │ │ │ └── programmer_apis.h │ │ │ │ ├── socket │ │ │ │ ├── include │ │ │ │ │ ├── m2m_socket_host_if.h │ │ │ │ │ └── socket.h │ │ │ │ └── source │ │ │ │ │ ├── socket.c │ │ │ │ │ └── socket_internal.h │ │ │ │ └── spi_flash │ │ │ │ ├── include │ │ │ │ ├── spi_flash.h │ │ │ │ └── spi_flash_map.h │ │ │ │ └── source │ │ │ │ └── spi_flash.c │ │ ├── services │ │ │ ├── serial │ │ │ │ ├── sam0_usart │ │ │ │ │ └── usart_serial.h │ │ │ │ └── serial.h │ │ │ ├── sleepmgr │ │ │ │ ├── samd │ │ │ │ │ ├── sleepmgr.c │ │ │ │ │ └── sleepmgr.h │ │ │ │ └── sleepmgr.h │ │ │ └── usb │ │ │ │ ├── class │ │ │ │ └── hid │ │ │ │ │ ├── device │ │ │ │ │ ├── generic │ │ │ │ │ │ ├── udi_hid_generic.c │ │ │ │ │ │ ├── udi_hid_generic.h │ │ │ │ │ │ ├── udi_hid_generic_conf.h │ │ │ │ │ │ └── udi_hid_generic_desc.c │ │ │ │ │ ├── udi_hid.c │ │ │ │ │ └── udi_hid.h │ │ │ │ │ └── usb_protocol_hid.h │ │ │ │ ├── udc │ │ │ │ ├── udc.c │ │ │ │ ├── udc.h │ │ │ │ ├── udc_desc.h │ │ │ │ ├── udd.h │ │ │ │ └── udi.h │ │ │ │ ├── usb_atmel.h │ │ │ │ └── usb_protocol.h │ │ └── utils │ │ │ ├── interrupt.h │ │ │ ├── interrupt │ │ │ ├── interrupt_sam_nvic.c │ │ │ └── interrupt_sam_nvic.h │ │ │ └── parts.h │ ├── common2 │ │ └── services │ │ │ └── delay │ │ │ ├── delay.h │ │ │ └── sam0 │ │ │ ├── systick_counter.c │ │ │ └── systick_counter.h │ ├── sam0 │ │ ├── boards │ │ │ └── samw25_xplained_pro │ │ │ │ ├── board_init.c │ │ │ │ └── samw25_xplained_pro.h │ │ ├── drivers │ │ │ ├── extint │ │ │ │ ├── extint.h │ │ │ │ ├── extint_callback.c │ │ │ │ ├── extint_callback.h │ │ │ │ └── extint_sam_d_r_h │ │ │ │ │ └── extint.c │ │ │ ├── port │ │ │ │ ├── port.c │ │ │ │ ├── port.h │ │ │ │ └── quick_start │ │ │ │ │ └── qs_port_basic.h │ │ │ ├── rtc │ │ │ │ ├── rtc_count.h │ │ │ │ ├── rtc_sam_d_r_h │ │ │ │ │ └── rtc_count.c │ │ │ │ └── rtc_tamper.h │ │ │ ├── sercom │ │ │ │ ├── i2c │ │ │ │ │ ├── i2c_common.h │ │ │ │ │ ├── i2c_master.h │ │ │ │ │ ├── i2c_sam0 │ │ │ │ │ │ └── i2c_master.c │ │ │ │ │ ├── quick_start_master │ │ │ │ │ │ └── qs_i2c_master_basic_use.h │ │ │ │ │ └── quick_start_master_dma │ │ │ │ │ │ └── qs_i2c_master_dma.h │ │ │ │ ├── sercom.c │ │ │ │ ├── sercom.h │ │ │ │ ├── sercom_interrupt.c │ │ │ │ ├── sercom_interrupt.h │ │ │ │ ├── sercom_pinout.h │ │ │ │ ├── spi │ │ │ │ │ ├── quick_start_dma │ │ │ │ │ │ └── qs_spi_dma_use.h │ │ │ │ │ ├── quick_start_master │ │ │ │ │ │ └── qs_spi_master_basic.h │ │ │ │ │ ├── quick_start_master_callback │ │ │ │ │ │ └── qs_spi_master_callback.h │ │ │ │ │ ├── quick_start_slave │ │ │ │ │ │ └── qs_spi_slave_basic.h │ │ │ │ │ ├── quick_start_slave_callback │ │ │ │ │ │ └── qs_spi_slave_callback.h │ │ │ │ │ ├── spi.c │ │ │ │ │ ├── spi.h │ │ │ │ │ ├── spi_interrupt.c │ │ │ │ │ └── spi_interrupt.h │ │ │ │ └── usart │ │ │ │ │ ├── quick_start │ │ │ │ │ └── qs_usart_basic_use.h │ │ │ │ │ ├── quick_start_callback │ │ │ │ │ └── qs_usart_callback.h │ │ │ │ │ ├── quick_start_dma │ │ │ │ │ └── qs_usart_dma_use.h │ │ │ │ │ ├── quick_start_lin │ │ │ │ │ └── qs_lin.h │ │ │ │ │ ├── usart.c │ │ │ │ │ ├── usart.h │ │ │ │ │ ├── usart_interrupt.c │ │ │ │ │ └── usart_interrupt.h │ │ │ ├── system │ │ │ │ ├── clock │ │ │ │ │ ├── clock.h │ │ │ │ │ ├── clock_samd21_r21_da_ha1 │ │ │ │ │ │ ├── clock.c │ │ │ │ │ │ ├── clock_config_check.h │ │ │ │ │ │ ├── clock_feature.h │ │ │ │ │ │ └── gclk.c │ │ │ │ │ └── gclk.h │ │ │ │ ├── interrupt │ │ │ │ │ ├── system_interrupt.c │ │ │ │ │ ├── system_interrupt.h │ │ │ │ │ └── system_interrupt_samd21 │ │ │ │ │ │ └── system_interrupt_features.h │ │ │ │ ├── pinmux │ │ │ │ │ ├── pinmux.c │ │ │ │ │ ├── pinmux.h │ │ │ │ │ └── quick_start │ │ │ │ │ │ └── qs_pinmux_basic.h │ │ │ │ ├── power │ │ │ │ │ └── power_sam_d_r_h │ │ │ │ │ │ └── power.h │ │ │ │ ├── reset │ │ │ │ │ └── reset_sam_d_r_h │ │ │ │ │ │ └── reset.h │ │ │ │ ├── system.c │ │ │ │ └── system.h │ │ │ ├── tc │ │ │ │ ├── tc.h │ │ │ │ ├── tc_interrupt.c │ │ │ │ ├── tc_interrupt.h │ │ │ │ └── tc_sam_d_r_h │ │ │ │ │ └── tc.c │ │ │ └── usb │ │ │ │ ├── stack_interface │ │ │ │ ├── usb_device_udd.c │ │ │ │ ├── usb_dual.c │ │ │ │ └── usb_dual.h │ │ │ │ ├── usb.h │ │ │ │ └── usb_sam_d_r │ │ │ │ └── usb.c │ │ └── utils │ │ │ ├── cmsis │ │ │ └── samd21 │ │ │ │ ├── include │ │ │ │ ├── component │ │ │ │ │ ├── ac.h │ │ │ │ │ ├── adc.h │ │ │ │ │ ├── dac.h │ │ │ │ │ ├── dmac.h │ │ │ │ │ ├── dsu.h │ │ │ │ │ ├── eic.h │ │ │ │ │ ├── evsys.h │ │ │ │ │ ├── gclk.h │ │ │ │ │ ├── hmatrixb.h │ │ │ │ │ ├── i2s.h │ │ │ │ │ ├── mtb.h │ │ │ │ │ ├── nvmctrl.h │ │ │ │ │ ├── pac.h │ │ │ │ │ ├── pm.h │ │ │ │ │ ├── port.h │ │ │ │ │ ├── rtc.h │ │ │ │ │ ├── sercom.h │ │ │ │ │ ├── sysctrl.h │ │ │ │ │ ├── tc.h │ │ │ │ │ ├── tcc.h │ │ │ │ │ ├── tcc_lighting.h │ │ │ │ │ ├── usb.h │ │ │ │ │ └── wdt.h │ │ │ │ ├── instance │ │ │ │ │ ├── ac.h │ │ │ │ │ ├── ac1.h │ │ │ │ │ ├── adc.h │ │ │ │ │ ├── dac.h │ │ │ │ │ ├── dmac.h │ │ │ │ │ ├── dsu.h │ │ │ │ │ ├── eic.h │ │ │ │ │ ├── evsys.h │ │ │ │ │ ├── gclk.h │ │ │ │ │ ├── i2s.h │ │ │ │ │ ├── mtb.h │ │ │ │ │ ├── nvmctrl.h │ │ │ │ │ ├── pac0.h │ │ │ │ │ ├── pac1.h │ │ │ │ │ ├── pac2.h │ │ │ │ │ ├── pm.h │ │ │ │ │ ├── port.h │ │ │ │ │ ├── rtc.h │ │ │ │ │ ├── sbmatrix.h │ │ │ │ │ ├── sercom0.h │ │ │ │ │ ├── sercom1.h │ │ │ │ │ ├── sercom2.h │ │ │ │ │ ├── sercom3.h │ │ │ │ │ ├── sercom4.h │ │ │ │ │ ├── sercom5.h │ │ │ │ │ ├── sysctrl.h │ │ │ │ │ ├── tc3.h │ │ │ │ │ ├── tc4.h │ │ │ │ │ ├── tc5.h │ │ │ │ │ ├── tc6.h │ │ │ │ │ ├── tc7.h │ │ │ │ │ ├── tcc0.h │ │ │ │ │ ├── tcc1.h │ │ │ │ │ ├── tcc2.h │ │ │ │ │ ├── usb.h │ │ │ │ │ └── wdt.h │ │ │ │ ├── pio │ │ │ │ │ ├── samd21e15a.h │ │ │ │ │ ├── samd21e15b.h │ │ │ │ │ ├── samd21e15bu.h │ │ │ │ │ ├── samd21e15l.h │ │ │ │ │ ├── samd21e16a.h │ │ │ │ │ ├── samd21e16b.h │ │ │ │ │ ├── samd21e16bu.h │ │ │ │ │ ├── samd21e16l.h │ │ │ │ │ ├── samd21e17a.h │ │ │ │ │ ├── samd21e18a.h │ │ │ │ │ ├── samd21g15a.h │ │ │ │ │ ├── samd21g15b.h │ │ │ │ │ ├── samd21g15l.h │ │ │ │ │ ├── samd21g16a.h │ │ │ │ │ ├── samd21g16b.h │ │ │ │ │ ├── samd21g16l.h │ │ │ │ │ ├── samd21g17a.h │ │ │ │ │ ├── samd21g17au.h │ │ │ │ │ ├── samd21g18a.h │ │ │ │ │ ├── samd21g18au.h │ │ │ │ │ ├── samd21j15a.h │ │ │ │ │ ├── samd21j15b.h │ │ │ │ │ ├── samd21j16a.h │ │ │ │ │ ├── samd21j16b.h │ │ │ │ │ ├── samd21j17a.h │ │ │ │ │ └── samd21j18a.h │ │ │ │ ├── samd21.h │ │ │ │ ├── samd21e15a.h │ │ │ │ ├── samd21e15b.h │ │ │ │ ├── samd21e15bu.h │ │ │ │ ├── samd21e15l.h │ │ │ │ ├── samd21e16a.h │ │ │ │ ├── samd21e16b.h │ │ │ │ ├── samd21e16bu.h │ │ │ │ ├── samd21e16l.h │ │ │ │ ├── samd21e17a.h │ │ │ │ ├── samd21e18a.h │ │ │ │ ├── samd21g15a.h │ │ │ │ ├── samd21g15b.h │ │ │ │ ├── samd21g15l.h │ │ │ │ ├── samd21g16a.h │ │ │ │ ├── samd21g16b.h │ │ │ │ ├── samd21g16l.h │ │ │ │ ├── samd21g17a.h │ │ │ │ ├── samd21g17au.h │ │ │ │ ├── samd21g18a.h │ │ │ │ ├── samd21g18au.h │ │ │ │ ├── samd21j15a.h │ │ │ │ ├── samd21j15b.h │ │ │ │ ├── samd21j16a.h │ │ │ │ ├── samd21j16b.h │ │ │ │ ├── samd21j17a.h │ │ │ │ └── samd21j18a.h │ │ │ │ └── source │ │ │ │ ├── gcc │ │ │ │ └── startup_samd21.c │ │ │ │ ├── system_samd21.c │ │ │ │ └── system_samd21.h │ │ │ ├── compiler.h │ │ │ ├── header_files │ │ │ └── io.h │ │ │ ├── linker_scripts │ │ │ └── samd21 │ │ │ │ └── gcc │ │ │ │ └── samd21g18a_flash.ld │ │ │ ├── make │ │ │ └── Makefile.sam.in │ │ │ ├── preprocessor │ │ │ ├── mrecursion.h │ │ │ ├── mrepeat.h │ │ │ ├── preprocessor.h │ │ │ ├── stringz.h │ │ │ └── tpaste.h │ │ │ ├── status_codes.h │ │ │ ├── stdio │ │ │ ├── read.c │ │ │ ├── stdio_serial │ │ │ │ └── stdio_serial.h │ │ │ └── write.c │ │ │ └── syscalls │ │ │ └── gcc │ │ │ └── syscalls.c │ └── thirdparty │ │ └── CMSIS │ │ ├── ATMEL-disclaimer.txt │ │ ├── CMSIS_END_USER_LICENCE_AGREEMENT.pdf │ │ ├── Include │ │ ├── arm_math.h │ │ ├── core_cm0plus.h │ │ ├── core_cmFunc.h │ │ └── core_cmInstr.h │ │ ├── Lib │ │ ├── GCC │ │ │ └── libarm_cortexM0l_math.a │ │ └── license.txt │ │ └── README.txt │ ├── asf.h │ └── config │ ├── conf_board.h │ ├── conf_clocks.h │ ├── conf_extint.h │ ├── conf_sleepmgr.h │ ├── conf_spi.h │ ├── conf_usb.h │ └── conf_winc.h ├── certs ├── Equifax_Secure_Certificate_Authority.cer ├── GTS_Root_R1.cer ├── GTS_Root_R2.cer ├── GlobalSignRoot.cer ├── GlobalSignRoot2.cer └── README.md ├── scripts ├── at_config.py ├── at_gui.py ├── at_kit_base.py ├── at_pubkey.py ├── at_set_time.py ├── requirements.txt └── shield.ico └── src ├── atca_kit_client.c ├── atca_kit_client.h ├── client_task.c ├── client_task.h ├── config.c ├── config.h ├── devices ├── fan_click.c ├── fan_click.h ├── thermo5_click.c └── thermo5_click.h ├── main.c ├── paho_mqtt_embedded_c ├── CONTRIBUTING.md ├── MQTTClient-C │ ├── MQTTClient.c │ └── MQTTClient.h ├── MQTTPacket │ ├── MQTTConnect.h │ ├── MQTTConnectClient.c │ ├── MQTTConnectServer.c │ ├── MQTTDeserializePublish.c │ ├── MQTTFormat.c │ ├── MQTTFormat.h │ ├── MQTTPacket.c │ ├── MQTTPacket.h │ ├── MQTTPublish.h │ ├── MQTTSerializePublish.c │ ├── MQTTSubscribe.h │ ├── MQTTSubscribeClient.c │ ├── MQTTSubscribeServer.c │ ├── MQTTUnsubscribe.h │ ├── MQTTUnsubscribeClient.c │ ├── MQTTUnsubscribeServer.c │ └── StackTrace.h ├── Makefile ├── README.md ├── about.html ├── edl-v10 ├── epl-v10 ├── notice.html └── platform │ ├── network_interface.c │ ├── network_interface.h │ ├── timer_interface.c │ └── timer_interface.h ├── parson_json ├── Parson JSON License.txt ├── parson.c └── parson.h ├── sensor_task.c ├── sensor_task.h ├── time_utils.c ├── time_utils.h ├── tiny_state_machine.h ├── usb_hid.c ├── usb_hid.h ├── wifi_task.c └── wifi_task.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Object files 5 | *.o 6 | *.ko 7 | *.obj 8 | *.elf 9 | 10 | # Linker output 11 | *.ilk 12 | *.map 13 | *.exp 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Libraries 20 | *.lib 21 | *.a 22 | *.la 23 | *.lo 24 | 25 | # Shared objects (inc. Windows DLLs) 26 | *.dll 27 | *.so 28 | *.so.* 29 | *.dylib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.i*86 36 | *.x86_64 37 | *.hex 38 | 39 | # Debug files 40 | *.dSYM/ 41 | *.su 42 | *.idb 43 | *.pdb -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/cryptoauthlib"] 2 | path = src/cryptoauthlib 3 | url = https://github.com/MicrochipTech/cryptoauthlib.git 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Microchip Examples for Google Cloud Platform IOT Core 2 | 3 | ### Summary 4 | 5 | This project contains examples and tools for setting up a secure IOT node with IOT Core 6 | using the ATECC508A or ATECC608A and WINC1500 with a selection of energy efficent microcontrollers. 7 | 8 | #### Security Devices: 9 | * [ATECC508A](http://www.microchip.com/wwwproducts/en/ATECC508A) 10 | * [ATECC608A](http://www.microchip.com/wwwproducts/en/ATECC608A) 11 | 12 | #### Connectivity: 13 | * [ATWINC1500](http://www.microchip.com/wwwproducts/en/ATWINC1500) - 802.11 b/g/n Module with integrated TLS 1.2 stack 14 | * [ATSAMW25](http://www.microchip.com/wwwproducts/en/ATSAMW25) - Integrated module featuring ATWINC1500 + ATSAMD21G18A + ATECC508A 15 | 16 | #### Microcontrollers or SOCs: 17 | * ATSAMD21 (ARM Cortex-M0) 18 | * ATSAMG55 (ARM Cortex-M4) 19 | * ATSAMW25 (ARM Cortex-M0) 20 | * Raspberry Pi 21 | 22 | ### Project Organization 23 | 24 | These examples were built with [Atmel Studio 7](http://www.atmel.com/microsite/atmel-studio/) 25 | 26 | ATSAMD21 Quick Start 27 | ```/boards/gcp_iot_core_samd21.atsln``` 28 | 29 | ATSAMG55 Quick Start 30 | ```/boards/gcp_iot_core_samg55.atsln``` 31 | 32 | ATSAMW25 Quick Start 33 | ```/boards/gcp_iot_core_samw25.atsln``` 34 | 35 | ### Getting Started 36 | 37 | The first step is ensuring that you have a [Google Cloud IoT Core](https://console.cloud.google.com) account set up with IoT core. 38 | 39 | The tutorials will walk you through the initial configuration of your account and creation of your first device registry 40 | 41 | 1) [IoT Core Getting Started Guide](https://cloud.google.com/iot/docs/how-tos/getting-started) 42 | 43 | 2) [IoT Core Quick start](https://cloud.google.com/iot/docs/quickstart) 44 | 45 | 46 | 47 | ### Examples 48 | 49 | #### Fan Controller 50 | 51 | This example features a number of interconnected devices to demonstrate data acquisition, control, and integration into Google IoT Core. 52 | 53 | Hardware Featured: 54 | * ATECC508A - Security/Cryptographic Authentication 55 | * ATWINC1500 - WIFI Connectivity 56 | * EMC1414 - Temperature Sensor 57 | * EMC2301 - 5V PWM Fan Controller 58 | 59 | 60 | ### License 61 | 62 | For more details of the included software and licenses please reference LICENSE.md 63 | 64 | The included software is covered by the Microchip License with the exception 65 | of the following: 66 | 67 | * ASF headers and WINC1500 driver software are covered by the BSD 3 clause license 68 | * Eclipse Paho MQTT Client is covered by the Eclipse Distribution License v 1.0 (BSD 3 clause) 69 | * Parson (JSON C library) is covered by the MIT free software license 70 | -------------------------------------------------------------------------------- /boards/gcp_iot_core_samd21.atsln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Atmel Studio Solution File, Format Version 11.00 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "fan_control_samd21", "samd21\fan_control_samd21.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|ARM = Debug|ARM 11 | Release|ARM = Release|ARM 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.ActiveCfg = Debug|ARM 15 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.Build.0 = Debug|ARM 16 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.ActiveCfg = Release|ARM 17 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.Build.0 = Release|ARM 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /boards/gcp_iot_core_samg55.atsln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Atmel Studio Solution File, Format Version 11.00 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "gcp_iot_core_samg55", "samg55\gcp_iot_core_samg55.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|ARM = Debug|ARM 11 | Release|ARM = Release|ARM 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.ActiveCfg = Debug|ARM 15 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.Build.0 = Debug|ARM 16 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.ActiveCfg = Release|ARM 17 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.Build.0 = Release|ARM 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /boards/gcp_iot_core_samw25.atsln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Atmel Studio Solution File, Format Version 11.00 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "fan_control_samw25", "samw25\fan_control_samw25.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|ARM = Debug|ARM 11 | Release|ARM = Release|ARM 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.ActiveCfg = Debug|ARM 15 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.Build.0 = Debug|ARM 16 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.ActiveCfg = Release|ARM 17 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.Build.0 = Release|ARM 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /boards/memory.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Existing D21/W25 with paho client 4 | 5 | Program Memory Usage : 139804 bytes 53.3 % Full 6 | Data Memory Usage : 19464 bytes 59.4 % Full -------------------------------------------------------------------------------- /boards/raspi/README.md: -------------------------------------------------------------------------------- 1 | # Cloud IoT Core Python MQTT example 2 | 3 | This sample app publishes data to Cloud Pub/Sub using the MQTT bridge provided 4 | as part of Google Cloud IoT Core. 5 | 6 | For detailed running instructions see the [MQTT code samples 7 | guide](https://cloud.google.com/iot/docs/protocol_bridge_guide). 8 | 9 | # Setup 10 | 11 | 1. Build libcryptoauth. From the base directory run (for I2C if the device is on a Pi shield, otherwise choose HID or CDC for USB kits) 12 | 13 | `make libcryptoauth TARGET_HAL=I2C` 14 | 15 | 2. Use virtualenv to create a local Python environment. 16 | 17 | `virtualenv env && source env/bin/activate` 18 | 19 | 3. Install the dependencies 20 | 21 | `pip install -r requirements.txt` 22 | 23 | 4. Download the CA root certificates from pki.google.com into the same 24 | directory as the example script: 25 | 26 | `wget https://pki.google.com/roots.pem` 27 | 28 | # Running the Sample 29 | 30 | The following snippet summarizes usage: 31 | 32 | cloudiot_mqtt_example.py [-h] 33 | --project_id=PROJECT_ID 34 | --registry_id=REGISTRY_ID 35 | --device_id=DEVICE_ID 36 | --private_key_file=PRIVATE_KEY_FILE 37 | --algorithm={RS256,ES256} 38 | [--cloud_region=CLOUD_REGION] 39 | [--ca_certs=CA_CERTS] 40 | [--num_messages=NUM_MESSAGES] 41 | [--mqtt_bridge_hostname=MQTT_BRIDGE_HOSTNAME] 42 | [--mqtt_bridge_port=MQTT_BRIDGE_PORT] 43 | [--message_type={event,state}] 44 | 45 | For example, if your project ID is `blue-jet-123`, the following example shows 46 | how you would execute using the configuration from the MQTT code samples guide: 47 | 48 | python cloudiot_mqtt_example.py \ 49 | --registry_id=my-registry \ 50 | --project_id=blue-jet-123 \ 51 | --device_id=my-python-device \ 52 | --algorithm=RS256 \ 53 | --private_key_file=../rsa_private.pem 54 | -------------------------------------------------------------------------------- /boards/raspi/at_pubkey.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from ctypes import * 3 | import base64 4 | import sys 5 | 6 | 7 | cryptolib = cdll.LoadLibrary('../../.build/libcryptoauth.so') 8 | 9 | status = cryptolib.atcab_init(cryptolib.cfg_ateccx08a_i2c_default) 10 | assert 0 == status 11 | 12 | serial = create_string_buffer(9) 13 | status = cryptolib.atcab_read_serial_number(byref(serial)) 14 | assert 0 == status 15 | 16 | serial = ''.join('%02X' % x for x in serial.raw) 17 | print('Serial Number: %s\n' % serial, file=sys.stderr) 18 | 19 | pubkey = create_string_buffer(64) 20 | status = cryptolib.atcab_genkey_base(0, 0, None, byref(pubkey)) 21 | assert 0 == status 22 | 23 | public_key = bytearray.fromhex('3059301306072A8648CE3D020106082A8648CE3D03010703420004') + bytes(pubkey.raw) 24 | public_key = '-----BEGIN PUBLIC KEY-----\n' + base64.b64encode(public_key).decode('ascii') + '\n-----END PUBLIC KEY-----' 25 | print(public_key) 26 | 27 | status = cryptolib.atcab_release(None) 28 | assert 0 == status 29 | -------------------------------------------------------------------------------- /boards/raspi/at_token.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | from ctypes import * 4 | import base64 5 | import json 6 | import datetime 7 | import sys 8 | import jwt 9 | from cryptography.hazmat.primitives import hashes 10 | from cryptography.hazmat.primitives.asymmetric import ec 11 | 12 | def hw_sign(msg): 13 | cryptolib = cdll.LoadLibrary('../../.build/libcryptoauth.so') 14 | 15 | status = cryptolib.atcab_init(cryptolib.cfg_ateccx08a_i2c_default) 16 | assert 0 == status 17 | 18 | digest = create_string_buffer(32) 19 | status = cryptolib.atcab_sha(len(msg), c_char_p(msg), byref(digest)) 20 | assert 0 == status 21 | 22 | signature = create_string_buffer(64) 23 | status = cryptolib.atcab_sign(0, byref(digest), byref(signature)) 24 | assert 0 == status 25 | return signature.raw 26 | 27 | def man_jwt(claims): 28 | 29 | header = '{"typ":"JWT","alg":"ES256"}' 30 | 31 | for k, v in claims.items(): 32 | if type(v) is datetime.datetime: 33 | claims[k] = int(v.timestamp()) 34 | 35 | payload = json.dumps(claims) 36 | #print('payload', payload) 37 | 38 | token = base64.urlsafe_b64encode(header.encode('ascii')).replace(b'=', b'') + b'.' 39 | #print('token', token) 40 | 41 | token = token + base64.urlsafe_b64encode(payload.encode('ascii')).replace(b'=',b'') 42 | #print('token', token) 43 | 44 | signature = hw_sign(token) 45 | 46 | token = token + b'.' + base64.urlsafe_b64encode(signature).replace(b'=',b'') 47 | return token 48 | 49 | class HwEcAlgorithm(jwt.algorithms.Algorithm): 50 | def __init__(self): 51 | self.hash_alg = hashes.SHA256 52 | 53 | def prepare_key(self, key): 54 | return key 55 | 56 | def sign(self, msg, key): 57 | return hw_sign(msg) 58 | 59 | def verify(self, msg, key, sig): 60 | try: 61 | der_sig = jwt.utils.raw_to_der_signature(sig, key.curve) 62 | except ValueError: 63 | return False 64 | 65 | try: 66 | key.verify(der_sig, msg, ec.ECDSA(self.hash_alg())) 67 | return True 68 | except InvalidSignature: 69 | return False 70 | 71 | 72 | def jwt_with_hw_alg(): 73 | #print('from pyjwt') 74 | inst = jwt.PyJWT(algorithms=[]) 75 | inst.register_algorithm('ES256', HwEcAlgorithm()) 76 | return inst 77 | 78 | 79 | if __name__ == '__main__': 80 | 81 | if len(sys.argv) < 2: 82 | print('Invalid number of arguments provided') 83 | exit(1) 84 | 85 | if len(sys.argv) == 3: 86 | mins = int(sys.argv[2]) 87 | else: 88 | mins = 60 89 | 90 | claims = { 'iat': datetime.datetime.utcnow(), 91 | 'exp': datetime.datetime.utcnow() + datetime.timedelta(minutes=mins), 92 | 'aud': sys.argv[1] } 93 | 94 | token = man_jwt(claims).decode('ascii') + '\n\n' 95 | print(token) 96 | 97 | -------------------------------------------------------------------------------- /boards/raspi/requirements.txt: -------------------------------------------------------------------------------- 1 | cryptoauthlib 2 | cryptography >= 2.3 3 | pyjwt >= 1.5.3 4 | paho-mqtt >= 1.3.0 5 | -------------------------------------------------------------------------------- /boards/samd21/Debug/fan_control_samd21.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/boards/samd21/Debug/fan_control_samd21.bin -------------------------------------------------------------------------------- /boards/samd21/Debug/fan_control_samd21.eep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/boards/samd21/Debug/fan_control_samd21.eep -------------------------------------------------------------------------------- /boards/samd21/fan_control_samd21.componentinfo.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/common/components/wifi/winc1500/WINC1500_SW_API.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/boards/samd21/src/ASF/common/components/wifi/winc1500/WINC1500_SW_API.chm -------------------------------------------------------------------------------- /boards/samd21/src/ASF/common/components/wifi/winc1500/bsp/include/nm_bsp_samd21.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * \file 4 | * 5 | * \brief This module contains SAMD21 BSP APIs declarations. 6 | * 7 | * Copyright (c) 2016-2017 Atmel Corporation. All rights reserved. 8 | * 9 | * \asf_license_start 10 | * 11 | * \page License 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions are met: 15 | * 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 19 | * 2. Redistributions in binary form must reproduce the above copyright notice, 20 | * this list of conditions and the following disclaimer in the documentation 21 | * and/or other materials provided with the distribution. 22 | * 23 | * 3. The name of Atmel may not be used to endorse or promote products derived 24 | * from this software without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | 42 | #ifndef _NM_BSP_SAMD21_H_ 43 | #define _NM_BSP_SAMD21_H_ 44 | 45 | #include "conf_winc.h" 46 | #include "math.h" 47 | 48 | #define NM_EDGE_INTERRUPT (1) 49 | 50 | #define NM_DEBUG CONF_WINC_DEBUG 51 | #define NM_BSP_PRINTF CONF_WINC_PRINTF 52 | 53 | #endif /* _NM_BSP_SAMD21_H_ */ 54 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/common/components/wifi/winc1500/programmer/programmer_apis.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * \file 4 | * 5 | * \brief Programmer APIs. 6 | * 7 | * Copyright (c) 2016-2017 Atmel Corporation. All rights reserved. 8 | * 9 | * \asf_license_start 10 | * 11 | * \page License 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions are met: 15 | * 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 19 | * 2. Redistributions in binary form must reproduce the above copyright notice, 20 | * this list of conditions and the following disclaimer in the documentation 21 | * and/or other materials provided with the distribution. 22 | * 23 | * 3. The name of Atmel may not be used to endorse or promote products derived 24 | * from this software without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | 42 | #ifndef FIRMWARE_PROGRAMMER_APIS_H_INCLUDED 43 | #define FIRMWARE_PROGRAMMER_APIS_H_INCLUDED 44 | 45 | #include "common/include/nm_common.h" 46 | #include "programmer/programmer.h" 47 | #include "spi_flash/include/spi_flash_map.h" 48 | 49 | #define programmer_write_cert_image(buff) programmer_write((uint8*)buff, M2M_TLS_FLASH_ROOTCERT_CACHE_OFFSET, M2M_TLS_FLASH_ROOTCERT_CACHE_SIZE) 50 | #define programmer_read_cert_image(buff) programmer_read((uint8*)buff, M2M_TLS_FLASH_ROOTCERT_CACHE_OFFSET, M2M_TLS_FLASH_ROOTCERT_CACHE_SIZE) 51 | #define programmer_erase_cert_image() programmer_erase(M2M_TLS_FLASH_ROOTCERT_CACHE_OFFSET, M2M_TLS_FLASH_ROOTCERT_CACHE_SIZE) 52 | 53 | #define programmer_write_firmware_image(buff,offSet,sz) programmer_write((uint8*)buff, offSet, sz) 54 | #define programmer_read_firmware_image(buff,offSet,sz) programmer_read((uint8*)buff, offSet, sz) 55 | 56 | #define programmer_erase_all() programmer_erase(0, programmer_get_flash_size()) 57 | 58 | #endif /* FIRMWARE_PROGRAMMER_APIS_H_INCLUDED */ 59 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/common/components/wifi/winc1500/socket/source/socket_internal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * \file 4 | * 5 | * \brief BSD compatible socket interface internal types. 6 | * 7 | * Copyright (c) 2016-2017 Atmel Corporation. All rights reserved. 8 | * 9 | * \asf_license_start 10 | * 11 | * \page License 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions are met: 15 | * 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 19 | * 2. Redistributions in binary form must reproduce the above copyright notice, 20 | * this list of conditions and the following disclaimer in the documentation 21 | * and/or other materials provided with the distribution. 22 | * 23 | * 3. The name of Atmel may not be used to endorse or promote products derived 24 | * from this software without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | #ifndef __SOCKET_INTERNAL_H__ 42 | #define __SOCKET_INTERNAL_H__ 43 | 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 50 | INCLUDES 51 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 52 | 53 | #include "socket/include/socket.h" 54 | #include "socket/include/m2m_socket_host_if.h" 55 | 56 | 57 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 58 | FUNCTION PROTOTYPES 59 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 60 | 61 | NMI_API void Socket_ReadSocketData(SOCKET sock, tstrSocketRecvMsg *pstrRecv,uint8 u8SocketMsg, 62 | uint32 u32StartAddress,uint16 u16ReadCount); 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif /* __cplusplus */ 67 | 68 | #endif /* __SOCKET_H__ */ 69 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/common/services/sleepmgr/samd/sleepmgr.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Chip-specific sleep manager configuration 5 | * 6 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | #include 47 | #include 48 | 49 | #if defined(CONFIG_SLEEPMGR_ENABLE) || defined(__DOXYGEN__) 50 | 51 | uint8_t sleepmgr_locks[SLEEPMGR_NR_OF_MODES]; 52 | 53 | #endif /* CONFIG_SLEEPMGR_ENABLE */ 54 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/sam0/drivers/sercom/sercom_interrupt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM Serial Peripheral Interface Driver 5 | * 6 | * Copyright (C) 2012-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | #ifndef SERCOM_INTERRUPT_H_INCLUDED 47 | #define SERCOM_INTERRUPT_H_INCLUDED 48 | 49 | #include "sercom.h" 50 | #include 51 | 52 | #ifdef __cplusplus 53 | extern "C" { 54 | #endif 55 | 56 | /* Look-up table for device instances */ 57 | extern void *_sercom_instances[SERCOM_INST_NUM]; 58 | 59 | typedef void (*sercom_handler_t)(uint8_t instance); 60 | 61 | enum system_interrupt_vector _sercom_get_interrupt_vector( 62 | Sercom *const sercom_instance); 63 | 64 | void _sercom_set_handler( 65 | const uint8_t instance, 66 | const sercom_handler_t interrupt_handler); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif /* SERCOM_INTERRUPT_H_INCLUDED */ 73 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/sam0/drivers/system/clock/clock.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM Clock Driver 5 | * 6 | * Copyright (C) 2012-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | #ifndef SYSTEM_CLOCK_H_INCLUDED 47 | #define SYSTEM_CLOCK_H_INCLUDED 48 | 49 | #include 50 | #include 51 | #include 52 | 53 | #endif /* SYSTEM_CLOCK_H_INCLUDED */ 54 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/sam0/utils/cmsis/samd21/include/instance/pac0.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Instance description for PAC0 5 | * 6 | * Copyright (c) 2016 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _SAMD21_PAC0_INSTANCE_ 45 | #define _SAMD21_PAC0_INSTANCE_ 46 | 47 | /* ========== Register definition for PAC0 peripheral ========== */ 48 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 49 | #define REG_PAC0_WPCLR (0x40000000U) /**< \brief (PAC0) Write Protection Clear */ 50 | #define REG_PAC0_WPSET (0x40000004U) /**< \brief (PAC0) Write Protection Set */ 51 | #else 52 | #define REG_PAC0_WPCLR (*(RwReg *)0x40000000U) /**< \brief (PAC0) Write Protection Clear */ 53 | #define REG_PAC0_WPSET (*(RwReg *)0x40000004U) /**< \brief (PAC0) Write Protection Set */ 54 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 55 | 56 | /* ========== Instance parameters for PAC0 peripheral ========== */ 57 | #define PAC0_WPROT_DEFAULT_VAL 0x00000000 // PAC protection mask at reset 58 | 59 | #endif /* _SAMD21_PAC0_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/sam0/utils/cmsis/samd21/include/instance/pac1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Instance description for PAC1 5 | * 6 | * Copyright (c) 2016 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _SAMD21_PAC1_INSTANCE_ 45 | #define _SAMD21_PAC1_INSTANCE_ 46 | 47 | /* ========== Register definition for PAC1 peripheral ========== */ 48 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 49 | #define REG_PAC1_WPCLR (0x41000000U) /**< \brief (PAC1) Write Protection Clear */ 50 | #define REG_PAC1_WPSET (0x41000004U) /**< \brief (PAC1) Write Protection Set */ 51 | #else 52 | #define REG_PAC1_WPCLR (*(RwReg *)0x41000000U) /**< \brief (PAC1) Write Protection Clear */ 53 | #define REG_PAC1_WPSET (*(RwReg *)0x41000004U) /**< \brief (PAC1) Write Protection Set */ 54 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 55 | 56 | /* ========== Instance parameters for PAC1 peripheral ========== */ 57 | #define PAC1_WPROT_DEFAULT_VAL 0x00000002 // PAC protection mask at reset 58 | 59 | #endif /* _SAMD21_PAC1_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/sam0/utils/cmsis/samd21/include/instance/pac2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Instance description for PAC2 5 | * 6 | * Copyright (c) 2016 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _SAMD21_PAC2_INSTANCE_ 45 | #define _SAMD21_PAC2_INSTANCE_ 46 | 47 | /* ========== Register definition for PAC2 peripheral ========== */ 48 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 49 | #define REG_PAC2_WPCLR (0x42000000U) /**< \brief (PAC2) Write Protection Clear */ 50 | #define REG_PAC2_WPSET (0x42000004U) /**< \brief (PAC2) Write Protection Set */ 51 | #else 52 | #define REG_PAC2_WPCLR (*(RwReg *)0x42000000U) /**< \brief (PAC2) Write Protection Clear */ 53 | #define REG_PAC2_WPSET (*(RwReg *)0x42000004U) /**< \brief (PAC2) Write Protection Set */ 54 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 55 | 56 | /* ========== Instance parameters for PAC2 peripheral ========== */ 57 | #define PAC2_WPROT_DEFAULT_VAL 0x00800000 // PAC protection mask at reset 58 | 59 | #endif /* _SAMD21_PAC2_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/sam0/utils/cmsis/samd21/source/system_samd21.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Low-level initialization functions called upon chip startup. 5 | * 6 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | #include "samd21.h" 48 | 49 | /** 50 | * Initial system clock frequency. The System RC Oscillator (RCSYS) provides 51 | * the source for the main clock at chip startup. 52 | */ 53 | #define __SYSTEM_CLOCK (1000000) 54 | 55 | uint32_t SystemCoreClock = __SYSTEM_CLOCK;/*!< System Clock Frequency (Core Clock)*/ 56 | 57 | /** 58 | * Initialize the system 59 | * 60 | * @brief Setup the microcontroller system. 61 | * Initialize the System and update the SystemCoreClock variable. 62 | */ 63 | void SystemInit(void) 64 | { 65 | // Keep the default device state after reset 66 | SystemCoreClock = __SYSTEM_CLOCK; 67 | return; 68 | } 69 | 70 | /** 71 | * Update SystemCoreClock variable 72 | * 73 | * @brief Updates the SystemCoreClock with current core Clock 74 | * retrieved from cpu registers. 75 | */ 76 | void SystemCoreClockUpdate(void) 77 | { 78 | // Not implemented 79 | SystemCoreClock = __SYSTEM_CLOCK; 80 | return; 81 | } 82 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/sam0/utils/cmsis/samd21/source/system_samd21.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Low-level initialization functions called upon chip startup 5 | * 6 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | #ifndef _SYSTEM_SAMD21_H_INCLUDED_ 48 | #define _SYSTEM_SAMD21_H_INCLUDED_ 49 | 50 | #ifdef __cplusplus 51 | extern "C" { 52 | #endif 53 | 54 | #include 55 | 56 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 57 | 58 | void SystemInit(void); 59 | void SystemCoreClockUpdate(void); 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif /* SYSTEM_SAMD21_H_INCLUDED */ 66 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/sam0/utils/preprocessor/preprocessor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Preprocessor utils. 5 | * 6 | * Copyright (C) 2012-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | #ifndef _PREPROCESSOR_H_ 48 | #define _PREPROCESSOR_H_ 49 | 50 | #include "tpaste.h" 51 | #include "stringz.h" 52 | #include "mrepeat.h" 53 | #include "mrecursion.h" 54 | 55 | #endif // _PREPROCESSOR_H_ 56 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/thirdparty/CMSIS/ATMEL-disclaimer.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Only the CMSIS required parts for ASF are included here, go to the below 3 | * address for the full package: 4 | * http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php 5 | * 6 | * The library file thirdparty/CMSIS/Lib/GCC/libarm_cortexM4lf_math_softfp.a was generated by ATMEL, which 7 | * is support -mfloat-abi=softfp compiler flag, and this is also the default selection for device that 8 | * have FPU module and enabled. 9 | * If customer want to use -mfloat-abi=hard compiler flag, the project compile/link flag and link library 10 | * should be manual modified. The library thirdparty/CMSIS/Lib/GCC/libarm_cortexM4lf_math.a is used for 11 | * -mfloat-abi=hard configration. 12 | * 13 | * __CORTEX_SC is not defined for cortex-m0+, and may cause compiler warning, so the include file 14 | * thirdparty/CMSIS/Include/core_cmInstr.h was modified to void such warning. 15 | * Modified from: 16 | * #if (__CORTEX_M >= 0x03) || (__CORTEX_SC >= 300) 17 | * to: 18 | * #if (__CORTEX_M >= 0x03) || ((defined(__CORTEX_SC)) && (__CORTEX_SC >= 300)) 19 | * 20 | */ 21 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/thirdparty/CMSIS/CMSIS_END_USER_LICENCE_AGREEMENT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/boards/samd21/src/ASF/thirdparty/CMSIS/CMSIS_END_USER_LICENCE_AGREEMENT.pdf -------------------------------------------------------------------------------- /boards/samd21/src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM0l_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/boards/samd21/src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM0l_math.a -------------------------------------------------------------------------------- /boards/samd21/src/ASF/thirdparty/CMSIS/Lib/license.txt: -------------------------------------------------------------------------------- 1 | All pre-build libraries contained in the folders "ARM" and "GCC" 2 | are guided by the following license: 3 | 4 | Copyright (C) 2009-2014 ARM Limited. 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 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 distribution. 14 | - Neither the name of ARM nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without 16 | specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE 22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /boards/samd21/src/ASF/thirdparty/CMSIS/README.txt: -------------------------------------------------------------------------------- 1 | * ------------------------------------------------------------------- 2 | * Copyright (C) 2011-2014 ARM Limited. All rights reserved. 3 | * 4 | * Date: 17 February 2014 5 | * Revision: V4.00 6 | * 7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS) 8 | * Title: Release Note for CMSIS 9 | * 10 | * ------------------------------------------------------------------- 11 | 12 | 13 | NOTE - Open the index.html file to access CMSIS documentation 14 | 15 | 16 | The Cortex Microcontroller Software Interface Standard (CMSIS) provides a single standard across all 17 | Cortex-Mx processor series vendors. It enables code re-use and code sharing across software projects 18 | and reduces time-to-market for new embedded applications. 19 | 20 | CMSIS is released under the terms of the end user license agreement ("CMSIS_END_USER_LICENCE_AGREEMENT.pdf"). 21 | Any user of the software package is bound to the terms and conditions of the end user license agreement. 22 | 23 | 24 | You will find the following sub-directories: 25 | 26 | Documentation - Contains CMSIS documentation. 27 | 28 | DSP_Lib - MDK project files, Examples and source files etc.. to build the 29 | CMSIS DSP Software Library for Cortex-M0, Cortex-M3, Cortex-M4 processors. 30 | 31 | Include - CMSIS Core Support and CMSIS DSP Include Files. 32 | 33 | Lib - CMSIS DSP Libraries. 34 | 35 | RTOS - CMSIS RTOS API template header file. 36 | 37 | Driver - CMSIS Peripheral Driver Interface. 38 | 39 | Pack - CMSIS Software Packs. 40 | Mechanism to install software, device support, APIs, and example projects. 41 | 42 | SVD - CMSIS SVD Schema files and Conversion Utility. 43 | -------------------------------------------------------------------------------- /boards/samd21/src/config/conf_board.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM D21 Xplained Pro board configuration. 5 | * 6 | * Copyright (c) 2016 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 26 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 27 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 28 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 29 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 33 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 34 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | * \asf_license_stop 38 | * 39 | */ 40 | 41 | #ifndef CONF_BOARD_H_INCLUDED 42 | #define CONF_BOARD_H_INCLUDED 43 | 44 | #endif /* CONF_BOARD_H_INCLUDED */ 45 | -------------------------------------------------------------------------------- /boards/samd21/src/config/conf_extint.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM External Interrupt Driver Configuration Header 5 | * 6 | * Copyright (C) 2013-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | #ifndef CONF_EXTINT_H_INCLUDED 47 | #define CONF_EXTINT_H_INCLUDED 48 | 49 | # define EXTINT_CLOCK_SOURCE GCLK_GENERATOR_0 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /boards/samd21/src/config/conf_sleepmgr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Chip-specific sleep manager configuration 5 | * 6 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | #ifndef CONF_SLEEPMGR_INCLUDED 47 | #define CONF_SLEEPMGR_INCLUDED 48 | 49 | // Sleep manager options 50 | #define CONFIG_SLEEPMGR_ENABLE 51 | 52 | #endif /* CONF_SLEEPMGR_INCLUDED */ 53 | -------------------------------------------------------------------------------- /boards/samd21/src/config/conf_spi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM SPI configuration 5 | * 6 | * Copyright (C) 2013-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | 48 | #ifndef CONF_SPI_H_INCLUDED 49 | # define CONF_SPI_H_INCLUDED 50 | 51 | # define CONF_SPI_MASTER_ENABLE true 52 | # define CONF_SPI_SLAVE_ENABLE false 53 | 54 | #endif /* CONF_SPI_H_INCLUDED */ 55 | 56 | -------------------------------------------------------------------------------- /boards/samg55/gcp_iot_core_samg55.componentinfo.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/common/components/wifi/winc1500/WINC1500_SW_API.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/boards/samg55/src/ASF/common/components/wifi/winc1500/WINC1500_SW_API.chm -------------------------------------------------------------------------------- /boards/samg55/src/ASF/common/components/wifi/winc1500/bsp/include/nm_bsp_samg55.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * \file 4 | * 5 | * \brief This module contains SAMG55 BSP APIs declarations. 6 | * 7 | * Copyright (c) 2016 Atmel Corporation. All rights reserved. 8 | * 9 | * \asf_license_start 10 | * 11 | * \page License 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions are met: 15 | * 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 19 | * 2. Redistributions in binary form must reproduce the above copyright notice, 20 | * this list of conditions and the following disclaimer in the documentation 21 | * and/or other materials provided with the distribution. 22 | * 23 | * 3. The name of Atmel may not be used to endorse or promote products derived 24 | * from this software without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | 42 | #ifndef _NM_BSP_SAMG55_H_ 43 | #define _NM_BSP_SAMG55_H_ 44 | 45 | #include "conf_winc.h" 46 | 47 | #define NM_EDGE_INTERRUPT (1) 48 | 49 | #define NM_DEBUG CONF_WINC_DEBUG 50 | #define NM_BSP_PRINTF CONF_WINC_PRINTF 51 | 52 | #endif /* _NM_BSP_SAMG55_H_ */ 53 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/common/components/wifi/winc1500/programmer/programmer_apis.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * \file 4 | * 5 | * \brief Programmer APIs. 6 | * 7 | * Copyright (c) 2016-2017 Atmel Corporation. All rights reserved. 8 | * 9 | * \asf_license_start 10 | * 11 | * \page License 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions are met: 15 | * 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 19 | * 2. Redistributions in binary form must reproduce the above copyright notice, 20 | * this list of conditions and the following disclaimer in the documentation 21 | * and/or other materials provided with the distribution. 22 | * 23 | * 3. The name of Atmel may not be used to endorse or promote products derived 24 | * from this software without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | 42 | #ifndef FIRMWARE_PROGRAMMER_APIS_H_INCLUDED 43 | #define FIRMWARE_PROGRAMMER_APIS_H_INCLUDED 44 | 45 | #include "common/include/nm_common.h" 46 | #include "programmer/programmer.h" 47 | #include "spi_flash/include/spi_flash_map.h" 48 | 49 | #define programmer_write_cert_image(buff) programmer_write((uint8*)buff, M2M_TLS_FLASH_ROOTCERT_CACHE_OFFSET, M2M_TLS_FLASH_ROOTCERT_CACHE_SIZE) 50 | #define programmer_read_cert_image(buff) programmer_read((uint8*)buff, M2M_TLS_FLASH_ROOTCERT_CACHE_OFFSET, M2M_TLS_FLASH_ROOTCERT_CACHE_SIZE) 51 | #define programmer_erase_cert_image() programmer_erase(M2M_TLS_FLASH_ROOTCERT_CACHE_OFFSET, M2M_TLS_FLASH_ROOTCERT_CACHE_SIZE) 52 | 53 | #define programmer_write_firmware_image(buff,offSet,sz) programmer_write((uint8*)buff, offSet, sz) 54 | #define programmer_read_firmware_image(buff,offSet,sz) programmer_read((uint8*)buff, offSet, sz) 55 | 56 | #define programmer_erase_all() programmer_erase(0, programmer_get_flash_size()) 57 | 58 | #endif /* FIRMWARE_PROGRAMMER_APIS_H_INCLUDED */ 59 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/common/components/wifi/winc1500/socket/source/socket_internal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * \file 4 | * 5 | * \brief BSD compatible socket interface internal types. 6 | * 7 | * Copyright (c) 2016-2017 Atmel Corporation. All rights reserved. 8 | * 9 | * \asf_license_start 10 | * 11 | * \page License 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions are met: 15 | * 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 19 | * 2. Redistributions in binary form must reproduce the above copyright notice, 20 | * this list of conditions and the following disclaimer in the documentation 21 | * and/or other materials provided with the distribution. 22 | * 23 | * 3. The name of Atmel may not be used to endorse or promote products derived 24 | * from this software without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | #ifndef __SOCKET_INTERNAL_H__ 42 | #define __SOCKET_INTERNAL_H__ 43 | 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 50 | INCLUDES 51 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 52 | 53 | #include "socket/include/socket.h" 54 | #include "socket/include/m2m_socket_host_if.h" 55 | 56 | 57 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 58 | FUNCTION PROTOTYPES 59 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 60 | 61 | NMI_API void Socket_ReadSocketData(SOCKET sock, tstrSocketRecvMsg *pstrRecv,uint8 u8SocketMsg, 62 | uint32 u32StartAddress,uint16 u16ReadCount); 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif /* __cplusplus */ 67 | 68 | #endif /* __SOCKET_H__ */ 69 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/common/services/delay/sam/cycle_counter.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief ARM functions for busy-wait delay loops 5 | * 6 | * Copyright (c) 2012-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | #include "cycle_counter.h" 48 | 49 | // Delay loop is put to SRAM so that FWS will not affect delay time 50 | OPTIMIZE_HIGH 51 | RAMFUNC 52 | void portable_delay_cycles(unsigned long n) 53 | { 54 | UNUSED(n); 55 | 56 | __asm ( 57 | "loop: DMB \n" 58 | "SUBS R0, R0, #1 \n" 59 | "BNE.N loop " 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/common/services/serial/usart_serial.c: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * \file 4 | * 5 | * \brief USART Serial driver functions. 6 | * 7 | * 8 | * Copyright (c) 2010-2015 Atmel Corporation. All rights reserved. 9 | * 10 | * \asf_license_start 11 | * 12 | * \page License 13 | * 14 | * Redistribution and use in source and binary forms, with or without 15 | * modification, are permitted provided that the following conditions are met: 16 | * 17 | * 1. Redistributions of source code must retain the above copyright notice, 18 | * this list of conditions and the following disclaimer. 19 | * 20 | * 2. Redistributions in binary form must reproduce the above copyright notice, 21 | * this list of conditions and the following disclaimer in the documentation 22 | * and/or other materials provided with the distribution. 23 | * 24 | * 3. The name of Atmel may not be used to endorse or promote products derived 25 | * from this software without specific prior written permission. 26 | * 27 | * 4. This software may only be redistributed and used in connection with an 28 | * Atmel microcontroller product. 29 | * 30 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 31 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 32 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 33 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 34 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 35 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 36 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 37 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 38 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 39 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 40 | * POSSIBILITY OF SUCH DAMAGE. 41 | * 42 | * \asf_license_stop 43 | * 44 | */ 45 | /* 46 | * Support and FAQ: visit Atmel Support 47 | */ 48 | #include "serial.h" 49 | 50 | /** 51 | * \brief Send a sequence of bytes to USART device 52 | * 53 | * \param usart Base address of the USART instance. 54 | * \param data Data buffer to read 55 | * \param len Length of data 56 | * 57 | */ 58 | status_code_t usart_serial_write_packet(usart_if usart, const uint8_t *data, 59 | size_t len) 60 | { 61 | while (len) { 62 | usart_serial_putchar(usart, *data); 63 | len--; 64 | data++; 65 | } 66 | return STATUS_OK; 67 | } 68 | 69 | 70 | /** 71 | * \brief Receive a sequence of bytes from USART device 72 | * 73 | * \param usart Base address of the USART instance. 74 | * \param data Data buffer to write 75 | * \param len Length of data 76 | * 77 | */ 78 | status_code_t usart_serial_read_packet(usart_if usart, uint8_t *data, 79 | size_t len) 80 | { 81 | while (len) { 82 | usart_serial_getchar(usart, data); 83 | len--; 84 | data++; 85 | } 86 | return STATUS_OK; 87 | } 88 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/common/services/sleepmgr/sam/sleepmgr.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM3/SAM4 Sleep manager implementation. 5 | * 6 | * Copyright (c) 2012-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | #include 48 | #include 49 | 50 | #if defined(CONFIG_SLEEPMGR_ENABLE) || defined(__DOXYGEN__) 51 | 52 | uint8_t sleepmgr_locks[SLEEPMGR_NR_OF_MODES]; 53 | 54 | #endif /* CONFIG_SLEEPMGR_ENABLE */ 55 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/boards/samg55_xplained_pro/led.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAMG55-XPLAINED-PRO LEDs support package. 5 | * 6 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | #ifndef LED_H_INCLUDED 48 | #define LED_H_INCLUDED 49 | 50 | #include "compiler.h" 51 | #include "ioport.h" 52 | 53 | /** 54 | * \brief Turns off the specified LEDs. 55 | * 56 | * \param led LED to turn off (LEDx_GPIO). 57 | * 58 | * \note The pins of the specified LEDs are set to GPIO output mode. 59 | */ 60 | #define LED_Off(led) ioport_set_pin_level(led##_GPIO, led##_INACTIVE_LEVEL) 61 | 62 | /** 63 | * \brief Turns on the specified LEDs. 64 | * 65 | * \param led LED to turn on (LEDx_GPIO). 66 | * 67 | * \note The pins of the specified LEDs are set to GPIO output mode. 68 | */ 69 | #define LED_On(led) ioport_set_pin_level(led##_GPIO, led##_ACTIVE_LEVEL) 70 | 71 | /** 72 | * \brief Toggles the specified LEDs. 73 | * 74 | * \param led LED to toggle (LEDx_GPIO). 75 | * 76 | * \note The pins of the specified LEDs are set to GPIO output mode. 77 | */ 78 | #define LED_Toggle(led) ioport_toggle_pin_level(led##_GPIO) 79 | 80 | 81 | #endif // LED_H_INCLUDED 82 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/drivers/pio/pio_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Parallel Input/Output (PIO) interrupt handler for SAM. 5 | * 6 | * Copyright (c) 2011-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | #ifndef PIO_HANDLER_H_INCLUDED 48 | #define PIO_HANDLER_H_INCLUDED 49 | 50 | #ifdef __cplusplus 51 | extern "C" { 52 | #endif 53 | 54 | void pio_handler_process(Pio *p_pio, uint32_t ul_id); 55 | void pio_handler_set_priority(Pio *p_pio, IRQn_Type ul_irqn, uint32_t ul_priority); 56 | uint32_t pio_handler_set(Pio *p_pio, uint32_t ul_id, uint32_t ul_mask, 57 | uint32_t ul_attr, void (*p_handler) (uint32_t, uint32_t)); 58 | uint32_t pio_handler_set_pin(uint32_t ul_pin, uint32_t ul_flag, 59 | void (*p_handler) (uint32_t, uint32_t)); 60 | 61 | #if (SAM3S || SAM4S || SAM4E) 62 | void pio_capture_handler_set(void (*p_handler)(Pio *)); 63 | #endif 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif /* PIO_HANDLER_H_INCLUDED */ 70 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/utils/cmsis/samg/samg55/include/instance/chipid.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 5 | * 6 | * \asf_license_start 7 | * 8 | * \page License 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 20 | * 3. The name of Atmel may not be used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * 4. This software may only be redistributed and used in connection with an 24 | * Atmel microcontroller product. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | /* 42 | * Support and FAQ: visit Atmel Support 43 | */ 44 | 45 | #ifndef _SAMG55_CHIPID_INSTANCE_ 46 | #define _SAMG55_CHIPID_INSTANCE_ 47 | 48 | /* ========== Register definition for CHIPID peripheral ========== */ 49 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 50 | #define REG_CHIPID_CIDR (0x400E0740U) /**< \brief (CHIPID) Chip ID Register */ 51 | #define REG_CHIPID_EXID (0x400E0744U) /**< \brief (CHIPID) Chip ID Extension Register */ 52 | #else 53 | #define REG_CHIPID_CIDR (*(__I uint32_t*)0x400E0740U) /**< \brief (CHIPID) Chip ID Register */ 54 | #define REG_CHIPID_EXID (*(__I uint32_t*)0x400E0744U) /**< \brief (CHIPID) Chip ID Extension Register */ 55 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 56 | 57 | #endif /* _SAMG55_CHIPID_INSTANCE_ */ 58 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/utils/cmsis/samg/samg55/include/instance/flexcom0.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 5 | * 6 | * \asf_license_start 7 | * 8 | * \page License 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 20 | * 3. The name of Atmel may not be used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * 4. This software may only be redistributed and used in connection with an 24 | * Atmel microcontroller product. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | /* 42 | * Support and FAQ: visit Atmel Support 43 | */ 44 | 45 | #ifndef _SAMG55_FLEXCOM0_INSTANCE_ 46 | #define _SAMG55_FLEXCOM0_INSTANCE_ 47 | 48 | /* ========== Register definition for FLEXCOM0 peripheral ========== */ 49 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 50 | #define REG_FLEXCOM0_MR (0x4000C000U) /**< \brief (FLEXCOM0) FLEXCOM Mode register */ 51 | #define REG_FLEXCOM0_RHR (0x4000C010U) /**< \brief (FLEXCOM0) FLEXCOM Receive Holding Register */ 52 | #define REG_FLEXCOM0_THR (0x4000C020U) /**< \brief (FLEXCOM0) FLEXCOM Transmit Holding Register */ 53 | #else 54 | #define REG_FLEXCOM0_MR (*(__IO uint32_t*)0x4000C000U) /**< \brief (FLEXCOM0) FLEXCOM Mode register */ 55 | #define REG_FLEXCOM0_RHR (*(__I uint32_t*)0x4000C010U) /**< \brief (FLEXCOM0) FLEXCOM Receive Holding Register */ 56 | #define REG_FLEXCOM0_THR (*(__IO uint32_t*)0x4000C020U) /**< \brief (FLEXCOM0) FLEXCOM Transmit Holding Register */ 57 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 58 | 59 | #endif /* _SAMG55_FLEXCOM0_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/utils/cmsis/samg/samg55/include/instance/flexcom1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 5 | * 6 | * \asf_license_start 7 | * 8 | * \page License 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 20 | * 3. The name of Atmel may not be used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * 4. This software may only be redistributed and used in connection with an 24 | * Atmel microcontroller product. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | /* 42 | * Support and FAQ: visit Atmel Support 43 | */ 44 | 45 | #ifndef _SAMG55_FLEXCOM1_INSTANCE_ 46 | #define _SAMG55_FLEXCOM1_INSTANCE_ 47 | 48 | /* ========== Register definition for FLEXCOM1 peripheral ========== */ 49 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 50 | #define REG_FLEXCOM1_MR (0x40020000U) /**< \brief (FLEXCOM1) FLEXCOM Mode register */ 51 | #define REG_FLEXCOM1_RHR (0x40020010U) /**< \brief (FLEXCOM1) FLEXCOM Receive Holding Register */ 52 | #define REG_FLEXCOM1_THR (0x40020020U) /**< \brief (FLEXCOM1) FLEXCOM Transmit Holding Register */ 53 | #else 54 | #define REG_FLEXCOM1_MR (*(__IO uint32_t*)0x40020000U) /**< \brief (FLEXCOM1) FLEXCOM Mode register */ 55 | #define REG_FLEXCOM1_RHR (*(__I uint32_t*)0x40020010U) /**< \brief (FLEXCOM1) FLEXCOM Receive Holding Register */ 56 | #define REG_FLEXCOM1_THR (*(__IO uint32_t*)0x40020020U) /**< \brief (FLEXCOM1) FLEXCOM Transmit Holding Register */ 57 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 58 | 59 | #endif /* _SAMG55_FLEXCOM1_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/utils/cmsis/samg/samg55/include/instance/flexcom2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 5 | * 6 | * \asf_license_start 7 | * 8 | * \page License 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 20 | * 3. The name of Atmel may not be used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * 4. This software may only be redistributed and used in connection with an 24 | * Atmel microcontroller product. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | /* 42 | * Support and FAQ: visit Atmel Support 43 | */ 44 | 45 | #ifndef _SAMG55_FLEXCOM2_INSTANCE_ 46 | #define _SAMG55_FLEXCOM2_INSTANCE_ 47 | 48 | /* ========== Register definition for FLEXCOM2 peripheral ========== */ 49 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 50 | #define REG_FLEXCOM2_MR (0x40024000U) /**< \brief (FLEXCOM2) FLEXCOM Mode register */ 51 | #define REG_FLEXCOM2_RHR (0x40024010U) /**< \brief (FLEXCOM2) FLEXCOM Receive Holding Register */ 52 | #define REG_FLEXCOM2_THR (0x40024020U) /**< \brief (FLEXCOM2) FLEXCOM Transmit Holding Register */ 53 | #else 54 | #define REG_FLEXCOM2_MR (*(__IO uint32_t*)0x40024000U) /**< \brief (FLEXCOM2) FLEXCOM Mode register */ 55 | #define REG_FLEXCOM2_RHR (*(__I uint32_t*)0x40024010U) /**< \brief (FLEXCOM2) FLEXCOM Receive Holding Register */ 56 | #define REG_FLEXCOM2_THR (*(__IO uint32_t*)0x40024020U) /**< \brief (FLEXCOM2) FLEXCOM Transmit Holding Register */ 57 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 58 | 59 | #endif /* _SAMG55_FLEXCOM2_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/utils/cmsis/samg/samg55/include/instance/flexcom3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 5 | * 6 | * \asf_license_start 7 | * 8 | * \page License 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 20 | * 3. The name of Atmel may not be used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * 4. This software may only be redistributed and used in connection with an 24 | * Atmel microcontroller product. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | /* 42 | * Support and FAQ: visit Atmel Support 43 | */ 44 | 45 | #ifndef _SAMG55_FLEXCOM3_INSTANCE_ 46 | #define _SAMG55_FLEXCOM3_INSTANCE_ 47 | 48 | /* ========== Register definition for FLEXCOM3 peripheral ========== */ 49 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 50 | #define REG_FLEXCOM3_MR (0x40018000U) /**< \brief (FLEXCOM3) FLEXCOM Mode register */ 51 | #define REG_FLEXCOM3_RHR (0x40018010U) /**< \brief (FLEXCOM3) FLEXCOM Receive Holding Register */ 52 | #define REG_FLEXCOM3_THR (0x40018020U) /**< \brief (FLEXCOM3) FLEXCOM Transmit Holding Register */ 53 | #else 54 | #define REG_FLEXCOM3_MR (*(__IO uint32_t*)0x40018000U) /**< \brief (FLEXCOM3) FLEXCOM Mode register */ 55 | #define REG_FLEXCOM3_RHR (*(__I uint32_t*)0x40018010U) /**< \brief (FLEXCOM3) FLEXCOM Receive Holding Register */ 56 | #define REG_FLEXCOM3_THR (*(__IO uint32_t*)0x40018020U) /**< \brief (FLEXCOM3) FLEXCOM Transmit Holding Register */ 57 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 58 | 59 | #endif /* _SAMG55_FLEXCOM3_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/utils/cmsis/samg/samg55/include/instance/flexcom4.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 5 | * 6 | * \asf_license_start 7 | * 8 | * \page License 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 20 | * 3. The name of Atmel may not be used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * 4. This software may only be redistributed and used in connection with an 24 | * Atmel microcontroller product. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | /* 42 | * Support and FAQ: visit Atmel Support 43 | */ 44 | 45 | #ifndef _SAMG55_FLEXCOM4_INSTANCE_ 46 | #define _SAMG55_FLEXCOM4_INSTANCE_ 47 | 48 | /* ========== Register definition for FLEXCOM4 peripheral ========== */ 49 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 50 | #define REG_FLEXCOM4_MR (0x4001C000U) /**< \brief (FLEXCOM4) FLEXCOM Mode register */ 51 | #define REG_FLEXCOM4_RHR (0x4001C010U) /**< \brief (FLEXCOM4) FLEXCOM Receive Holding Register */ 52 | #define REG_FLEXCOM4_THR (0x4001C020U) /**< \brief (FLEXCOM4) FLEXCOM Transmit Holding Register */ 53 | #else 54 | #define REG_FLEXCOM4_MR (*(__IO uint32_t*)0x4001C000U) /**< \brief (FLEXCOM4) FLEXCOM Mode register */ 55 | #define REG_FLEXCOM4_RHR (*(__I uint32_t*)0x4001C010U) /**< \brief (FLEXCOM4) FLEXCOM Receive Holding Register */ 56 | #define REG_FLEXCOM4_THR (*(__IO uint32_t*)0x4001C020U) /**< \brief (FLEXCOM4) FLEXCOM Transmit Holding Register */ 57 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 58 | 59 | #endif /* _SAMG55_FLEXCOM4_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/utils/cmsis/samg/samg55/include/instance/gpbr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 5 | * 6 | * \asf_license_start 7 | * 8 | * \page License 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 20 | * 3. The name of Atmel may not be used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * 4. This software may only be redistributed and used in connection with an 24 | * Atmel microcontroller product. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | /* 42 | * Support and FAQ: visit Atmel Support 43 | */ 44 | 45 | #ifndef _SAMG55_GPBR_INSTANCE_ 46 | #define _SAMG55_GPBR_INSTANCE_ 47 | 48 | /* ========== Register definition for GPBR peripheral ========== */ 49 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 50 | #define REG_GPBR_GPBR (0x400E1490U) /**< \brief (GPBR) General Purpose Backup Register */ 51 | #else 52 | #define REG_GPBR_GPBR (*(__IO uint32_t*)0x400E1490U) /**< \brief (GPBR) General Purpose Backup Register */ 53 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 54 | 55 | #endif /* _SAMG55_GPBR_INSTANCE_ */ 56 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/utils/cmsis/samg/samg55/include/instance/rstc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 5 | * 6 | * \asf_license_start 7 | * 8 | * \page License 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 20 | * 3. The name of Atmel may not be used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * 4. This software may only be redistributed and used in connection with an 24 | * Atmel microcontroller product. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | /* 42 | * Support and FAQ: visit Atmel Support 43 | */ 44 | 45 | #ifndef _SAMG55_RSTC_INSTANCE_ 46 | #define _SAMG55_RSTC_INSTANCE_ 47 | 48 | /* ========== Register definition for RSTC peripheral ========== */ 49 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 50 | #define REG_RSTC_CR (0x400E1400U) /**< \brief (RSTC) Control Register */ 51 | #define REG_RSTC_SR (0x400E1404U) /**< \brief (RSTC) Status Register */ 52 | #define REG_RSTC_MR (0x400E1408U) /**< \brief (RSTC) Mode Register */ 53 | #else 54 | #define REG_RSTC_CR (*(__O uint32_t*)0x400E1400U) /**< \brief (RSTC) Control Register */ 55 | #define REG_RSTC_SR (*(__I uint32_t*)0x400E1404U) /**< \brief (RSTC) Status Register */ 56 | #define REG_RSTC_MR (*(__IO uint32_t*)0x400E1408U) /**< \brief (RSTC) Mode Register */ 57 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 58 | 59 | #endif /* _SAMG55_RSTC_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/utils/cmsis/samg/samg55/include/instance/wdt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 5 | * 6 | * \asf_license_start 7 | * 8 | * \page License 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 20 | * 3. The name of Atmel may not be used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * 4. This software may only be redistributed and used in connection with an 24 | * Atmel microcontroller product. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | /* 42 | * Support and FAQ: visit Atmel Support 43 | */ 44 | 45 | #ifndef _SAMG55_WDT_INSTANCE_ 46 | #define _SAMG55_WDT_INSTANCE_ 47 | 48 | /* ========== Register definition for WDT peripheral ========== */ 49 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 50 | #define REG_WDT_CR (0x400E1450U) /**< \brief (WDT) Control Register */ 51 | #define REG_WDT_MR (0x400E1454U) /**< \brief (WDT) Mode Register */ 52 | #define REG_WDT_SR (0x400E1458U) /**< \brief (WDT) Status Register */ 53 | #else 54 | #define REG_WDT_CR (*(__O uint32_t*)0x400E1450U) /**< \brief (WDT) Control Register */ 55 | #define REG_WDT_MR (*(__IO uint32_t*)0x400E1454U) /**< \brief (WDT) Mode Register */ 56 | #define REG_WDT_SR (*(__I uint32_t*)0x400E1458U) /**< \brief (WDT) Status Register */ 57 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 58 | 59 | #endif /* _SAMG55_WDT_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/utils/cmsis/samg/samg55/include/samg55.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 5 | * 6 | * \asf_license_start 7 | * 8 | * \page License 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 20 | * 3. The name of Atmel may not be used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * 4. This software may only be redistributed and used in connection with an 24 | * Atmel microcontroller product. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | /* 42 | * Support and FAQ: visit Atmel Support 43 | */ 44 | #ifndef _SAMG55_ 45 | #define _SAMG55_ 46 | 47 | #if defined (__SAMG55G18__) 48 | #include "samg55g18.h" 49 | #elif defined (__SAMG55G19__) 50 | #include "samg55g19.h" 51 | #elif defined (__SAMG55J18__) 52 | #include "samg55j18.h" 53 | #elif defined (__SAMG55J19__) 54 | #include "samg55j19.h" 55 | #elif defined (__SAMG55N19__) 56 | #include "samg55n19.h" 57 | #else 58 | #error Library does not support the specified device. 59 | #endif 60 | 61 | #endif /* _SAMG55_ */ 62 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/utils/cmsis/samg/samg55/include/system_samg55.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 5 | * 6 | * \asf_license_start 7 | * 8 | * \page License 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 20 | * 3. The name of Atmel may not be used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * 4. This software may only be redistributed and used in connection with an 24 | * Atmel microcontroller product. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | /* 42 | * Support and FAQ: visit Atmel Support 43 | */ 44 | 45 | #ifndef SYSTEM_SAMG55_H_INCLUDED 46 | #define SYSTEM_SAMG55_H_INCLUDED 47 | 48 | /* @cond 0 */ 49 | /**INDENT-OFF**/ 50 | #ifdef __cplusplus 51 | extern "C" { 52 | #endif 53 | /**INDENT-ON**/ 54 | /* @endcond */ 55 | 56 | #include 57 | 58 | extern uint32_t SystemCoreClock; /* System Clock Frequency (Core Clock) */ 59 | 60 | /** 61 | * @brief Setup the microcontroller system. 62 | * Initialize the System and update the SystemCoreClock variable. 63 | */ 64 | void SystemInit(void); 65 | 66 | /** 67 | * @brief Updates the SystemCoreClock with current core Clock 68 | * retrieved from cpu registers. 69 | */ 70 | void SystemCoreClockUpdate(void); 71 | 72 | /** 73 | * Initialize flash. 74 | */ 75 | void system_init_flash(uint32_t dw_clk); 76 | 77 | /* @cond 0 */ 78 | /**INDENT-OFF**/ 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | /**INDENT-ON**/ 83 | /* @endcond */ 84 | 85 | #endif /* SYSTEM_SAMG55_H_INCLUDED */ 86 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/sam/utils/preprocessor/preprocessor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Preprocessor utils. 5 | * 6 | * Copyright (c) 2010-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | #ifndef _PREPROCESSOR_H_ 48 | #define _PREPROCESSOR_H_ 49 | 50 | #include "tpaste.h" 51 | #include "stringz.h" 52 | #include "mrepeat.h" 53 | 54 | 55 | #endif // _PREPROCESSOR_H_ 56 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/thirdparty/CMSIS/ATMEL-disclaimer.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Only the CMSIS required parts for ASF are included here, go to the below 3 | * address for the full package: 4 | * http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php 5 | * 6 | * The library file thirdparty/CMSIS/Lib/GCC/libarm_cortexM4lf_math_softfp.a was generated by ATMEL, which 7 | * is support -mfloat-abi=softfp compiler flag, and this is also the default selection for device that 8 | * have FPU module and enabled. 9 | * If customer want to use -mfloat-abi=hard compiler flag, the project compile/link flag and link library 10 | * should be manual modified. The library thirdparty/CMSIS/Lib/GCC/libarm_cortexM4lf_math.a is used for 11 | * -mfloat-abi=hard configration. 12 | * 13 | * __CORTEX_SC is not defined for cortex-m0+, and may cause compiler warning, so the include file 14 | * thirdparty/CMSIS/Include/core_cmInstr.h was modified to void such warning. 15 | * Modified from: 16 | * #if (__CORTEX_M >= 0x03) || (__CORTEX_SC >= 300) 17 | * to: 18 | * #if (__CORTEX_M >= 0x03) || ((defined(__CORTEX_SC)) && (__CORTEX_SC >= 300)) 19 | * 20 | */ 21 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/thirdparty/CMSIS/CMSIS_END_USER_LICENCE_AGREEMENT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/boards/samg55/src/ASF/thirdparty/CMSIS/CMSIS_END_USER_LICENCE_AGREEMENT.pdf -------------------------------------------------------------------------------- /boards/samg55/src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM4lf_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/boards/samg55/src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM4lf_math.a -------------------------------------------------------------------------------- /boards/samg55/src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM4lf_math_softfp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/boards/samg55/src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM4lf_math_softfp.a -------------------------------------------------------------------------------- /boards/samg55/src/ASF/thirdparty/CMSIS/Lib/license.txt: -------------------------------------------------------------------------------- 1 | All pre-build libraries contained in the folders "ARM" and "GCC" 2 | are guided by the following license: 3 | 4 | Copyright (C) 2009-2014 ARM Limited. 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 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 distribution. 14 | - Neither the name of ARM nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without 16 | specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE 22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /boards/samg55/src/ASF/thirdparty/CMSIS/README.txt: -------------------------------------------------------------------------------- 1 | * ------------------------------------------------------------------- 2 | * Copyright (C) 2011-2014 ARM Limited. All rights reserved. 3 | * 4 | * Date: 17 February 2014 5 | * Revision: V4.00 6 | * 7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS) 8 | * Title: Release Note for CMSIS 9 | * 10 | * ------------------------------------------------------------------- 11 | 12 | 13 | NOTE - Open the index.html file to access CMSIS documentation 14 | 15 | 16 | The Cortex Microcontroller Software Interface Standard (CMSIS) provides a single standard across all 17 | Cortex-Mx processor series vendors. It enables code re-use and code sharing across software projects 18 | and reduces time-to-market for new embedded applications. 19 | 20 | CMSIS is released under the terms of the end user license agreement ("CMSIS_END_USER_LICENCE_AGREEMENT.pdf"). 21 | Any user of the software package is bound to the terms and conditions of the end user license agreement. 22 | 23 | 24 | You will find the following sub-directories: 25 | 26 | Documentation - Contains CMSIS documentation. 27 | 28 | DSP_Lib - MDK project files, Examples and source files etc.. to build the 29 | CMSIS DSP Software Library for Cortex-M0, Cortex-M3, Cortex-M4 processors. 30 | 31 | Include - CMSIS Core Support and CMSIS DSP Include Files. 32 | 33 | Lib - CMSIS DSP Libraries. 34 | 35 | RTOS - CMSIS RTOS API template header file. 36 | 37 | Driver - CMSIS Peripheral Driver Interface. 38 | 39 | Pack - CMSIS Software Packs. 40 | Mechanism to install software, device support, APIs, and example projects. 41 | 42 | SVD - CMSIS SVD Schema files and Conversion Utility. 43 | -------------------------------------------------------------------------------- /boards/samg55/src/config/conf_board.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM4S Xplained Pro board configuration 5 | * 6 | * Copyright (c) 2016 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 26 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 27 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 28 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 29 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 33 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 34 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | * \asf_license_stop 38 | */ 39 | 40 | #ifndef CONF_BOARD_H_INCLUDED 41 | #define CONF_BOARD_H_INCLUDED 42 | 43 | #define CONF_BOARD_UART_CONSOLE 44 | 45 | /** Configure SPI5 pins */ 46 | #define CONF_BOARD_SPI 47 | #define CONF_BOARD_SPI_NPCS0 48 | 49 | #define BOARD_FLEXCOM_SPI FLEXCOM5 50 | 51 | 52 | /** Definition of TWI interrupt ID on board. */ 53 | #define BOARD_TWI_IRQn TWI4_IRQn 54 | #define BOARD_TWI_Handler TWI4_Handler 55 | 56 | /** Configure TWI4 pins */ 57 | #define CONF_BOARD_TWI4 58 | #define CONF_BOARD_TWI6 59 | 60 | 61 | #define BOARD_FLEXCOM_TWI FLEXCOM4 62 | 63 | 64 | 65 | 66 | 67 | #endif /* CONF_BOARD_H_INCLUDED */ 68 | -------------------------------------------------------------------------------- /boards/samg55/src/config/conf_sleepmgr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Chip-specific sleep manager configuration 5 | * 6 | * Copyright (c) 2012-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | #ifndef CONF_SLEEPMGR_H 47 | #define CONF_SLEEPMGR_H 48 | 49 | // Sleep manager options 50 | #define CONFIG_SLEEPMGR_ENABLE 51 | 52 | #endif /* CONF_SLEEPMGR_H */ 53 | -------------------------------------------------------------------------------- /boards/samg55/src/config/conf_uart_serial.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Serial USART service configuration. 5 | * 6 | * Copyright (c) 2011-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | #ifndef CONF_USART_SERIAL_H 48 | #define CONF_USART_SERIAL_H 49 | 50 | /** UART Interface */ 51 | #define CONF_UART CONSOLE_UART 52 | /** Baudrate setting */ 53 | #define CONF_UART_BAUDRATE (115200UL) 54 | /** Character length setting */ 55 | #define CONF_UART_CHAR_LENGTH US_MR_CHRL_8_BIT 56 | /** Parity setting */ 57 | #define CONF_UART_PARITY US_MR_PAR_NO 58 | /** Stop bits setting */ 59 | #define CONF_UART_STOP_BITS US_MR_NBSTOP_1_BIT 60 | 61 | #endif/* CONF_USART_SERIAL_H_INCLUDED */ 62 | -------------------------------------------------------------------------------- /boards/samw25/fan_control_samw25.componentinfo.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/common/components/wifi/winc1500/WINC1500_SW_API.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/boards/samw25/src/ASF/common/components/wifi/winc1500/WINC1500_SW_API.chm -------------------------------------------------------------------------------- /boards/samw25/src/ASF/common/components/wifi/winc1500/bsp/include/nm_bsp_samd21.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * \file 4 | * 5 | * \brief This module contains SAMD21 BSP APIs declarations. 6 | * 7 | * Copyright (c) 2016-2017 Atmel Corporation. All rights reserved. 8 | * 9 | * \asf_license_start 10 | * 11 | * \page License 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions are met: 15 | * 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 19 | * 2. Redistributions in binary form must reproduce the above copyright notice, 20 | * this list of conditions and the following disclaimer in the documentation 21 | * and/or other materials provided with the distribution. 22 | * 23 | * 3. The name of Atmel may not be used to endorse or promote products derived 24 | * from this software without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | 42 | #ifndef _NM_BSP_SAMD21_H_ 43 | #define _NM_BSP_SAMD21_H_ 44 | 45 | #include "conf_winc.h" 46 | #include "math.h" 47 | 48 | #define NM_EDGE_INTERRUPT (1) 49 | 50 | #define NM_DEBUG CONF_WINC_DEBUG 51 | #define NM_BSP_PRINTF CONF_WINC_PRINTF 52 | 53 | #endif /* _NM_BSP_SAMD21_H_ */ 54 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/common/components/wifi/winc1500/programmer/programmer_apis.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * \file 4 | * 5 | * \brief Programmer APIs. 6 | * 7 | * Copyright (c) 2016-2017 Atmel Corporation. All rights reserved. 8 | * 9 | * \asf_license_start 10 | * 11 | * \page License 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions are met: 15 | * 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 19 | * 2. Redistributions in binary form must reproduce the above copyright notice, 20 | * this list of conditions and the following disclaimer in the documentation 21 | * and/or other materials provided with the distribution. 22 | * 23 | * 3. The name of Atmel may not be used to endorse or promote products derived 24 | * from this software without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | 42 | #ifndef FIRMWARE_PROGRAMMER_APIS_H_INCLUDED 43 | #define FIRMWARE_PROGRAMMER_APIS_H_INCLUDED 44 | 45 | #include "common/include/nm_common.h" 46 | #include "programmer/programmer.h" 47 | #include "spi_flash/include/spi_flash_map.h" 48 | 49 | #define programmer_write_cert_image(buff) programmer_write((uint8*)buff, M2M_TLS_FLASH_ROOTCERT_CACHE_OFFSET, M2M_TLS_FLASH_ROOTCERT_CACHE_SIZE) 50 | #define programmer_read_cert_image(buff) programmer_read((uint8*)buff, M2M_TLS_FLASH_ROOTCERT_CACHE_OFFSET, M2M_TLS_FLASH_ROOTCERT_CACHE_SIZE) 51 | #define programmer_erase_cert_image() programmer_erase(M2M_TLS_FLASH_ROOTCERT_CACHE_OFFSET, M2M_TLS_FLASH_ROOTCERT_CACHE_SIZE) 52 | 53 | #define programmer_write_firmware_image(buff,offSet,sz) programmer_write((uint8*)buff, offSet, sz) 54 | #define programmer_read_firmware_image(buff,offSet,sz) programmer_read((uint8*)buff, offSet, sz) 55 | 56 | #define programmer_erase_all() programmer_erase(0, programmer_get_flash_size()) 57 | 58 | #endif /* FIRMWARE_PROGRAMMER_APIS_H_INCLUDED */ 59 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/common/components/wifi/winc1500/socket/source/socket_internal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * \file 4 | * 5 | * \brief BSD compatible socket interface internal types. 6 | * 7 | * Copyright (c) 2016-2017 Atmel Corporation. All rights reserved. 8 | * 9 | * \asf_license_start 10 | * 11 | * \page License 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions are met: 15 | * 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 19 | * 2. Redistributions in binary form must reproduce the above copyright notice, 20 | * this list of conditions and the following disclaimer in the documentation 21 | * and/or other materials provided with the distribution. 22 | * 23 | * 3. The name of Atmel may not be used to endorse or promote products derived 24 | * from this software without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | * \asf_license_stop 39 | * 40 | */ 41 | #ifndef __SOCKET_INTERNAL_H__ 42 | #define __SOCKET_INTERNAL_H__ 43 | 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 50 | INCLUDES 51 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 52 | 53 | #include "socket/include/socket.h" 54 | #include "socket/include/m2m_socket_host_if.h" 55 | 56 | 57 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 58 | FUNCTION PROTOTYPES 59 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 60 | 61 | NMI_API void Socket_ReadSocketData(SOCKET sock, tstrSocketRecvMsg *pstrRecv,uint8 u8SocketMsg, 62 | uint32 u32StartAddress,uint16 u16ReadCount); 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif /* __cplusplus */ 67 | 68 | #endif /* __SOCKET_H__ */ 69 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/common/services/sleepmgr/samd/sleepmgr.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Chip-specific sleep manager configuration 5 | * 6 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | #include 47 | #include 48 | 49 | #if defined(CONFIG_SLEEPMGR_ENABLE) || defined(__DOXYGEN__) 50 | 51 | uint8_t sleepmgr_locks[SLEEPMGR_NR_OF_MODES]; 52 | 53 | #endif /* CONFIG_SLEEPMGR_ENABLE */ 54 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/sam0/boards/samw25_xplained_pro/board_init.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM W25 Xplained Pro board initialization 5 | * 6 | * Copyright (c) 2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #include 45 | #include 46 | #include 47 | #include 48 | 49 | #if defined(__GNUC__) 50 | void board_init(void) WEAK __attribute__((alias("system_board_init"))); 51 | #elif defined(__ICCARM__) 52 | void board_init(void); 53 | # pragma weak board_init=system_board_init 54 | #endif 55 | 56 | void system_board_init(void) 57 | { 58 | struct port_config pin_conf; 59 | port_get_config_defaults(&pin_conf); 60 | 61 | /* Configure LEDs as outputs, turn them off */ 62 | pin_conf.direction = PORT_PIN_DIR_OUTPUT; 63 | port_pin_set_config(LED_0_PIN, &pin_conf); 64 | port_pin_set_output_level(LED_0_PIN, LED_0_INACTIVE); 65 | 66 | /* Set buttons as inputs */ 67 | pin_conf.direction = PORT_PIN_DIR_INPUT; 68 | pin_conf.input_pull = PORT_PIN_PULL_UP; 69 | port_pin_set_config(BUTTON_0_PIN, &pin_conf); 70 | } 71 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/sam0/drivers/sercom/sercom_interrupt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM Serial Peripheral Interface Driver 5 | * 6 | * Copyright (C) 2012-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | #ifndef SERCOM_INTERRUPT_H_INCLUDED 47 | #define SERCOM_INTERRUPT_H_INCLUDED 48 | 49 | #include "sercom.h" 50 | #include 51 | 52 | #ifdef __cplusplus 53 | extern "C" { 54 | #endif 55 | 56 | /* Look-up table for device instances */ 57 | extern void *_sercom_instances[SERCOM_INST_NUM]; 58 | 59 | typedef void (*sercom_handler_t)(uint8_t instance); 60 | 61 | enum system_interrupt_vector _sercom_get_interrupt_vector( 62 | Sercom *const sercom_instance); 63 | 64 | void _sercom_set_handler( 65 | const uint8_t instance, 66 | const sercom_handler_t interrupt_handler); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif /* SERCOM_INTERRUPT_H_INCLUDED */ 73 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/sam0/drivers/system/clock/clock.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM Clock Driver 5 | * 6 | * Copyright (C) 2012-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | #ifndef SYSTEM_CLOCK_H_INCLUDED 47 | #define SYSTEM_CLOCK_H_INCLUDED 48 | 49 | #include 50 | #include 51 | #include 52 | 53 | #endif /* SYSTEM_CLOCK_H_INCLUDED */ 54 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/sam0/utils/cmsis/samd21/include/instance/pac0.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Instance description for PAC0 5 | * 6 | * Copyright (c) 2016 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _SAMD21_PAC0_INSTANCE_ 45 | #define _SAMD21_PAC0_INSTANCE_ 46 | 47 | /* ========== Register definition for PAC0 peripheral ========== */ 48 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 49 | #define REG_PAC0_WPCLR (0x40000000U) /**< \brief (PAC0) Write Protection Clear */ 50 | #define REG_PAC0_WPSET (0x40000004U) /**< \brief (PAC0) Write Protection Set */ 51 | #else 52 | #define REG_PAC0_WPCLR (*(RwReg *)0x40000000U) /**< \brief (PAC0) Write Protection Clear */ 53 | #define REG_PAC0_WPSET (*(RwReg *)0x40000004U) /**< \brief (PAC0) Write Protection Set */ 54 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 55 | 56 | /* ========== Instance parameters for PAC0 peripheral ========== */ 57 | #define PAC0_WPROT_DEFAULT_VAL 0x00000000 // PAC protection mask at reset 58 | 59 | #endif /* _SAMD21_PAC0_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/sam0/utils/cmsis/samd21/include/instance/pac1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Instance description for PAC1 5 | * 6 | * Copyright (c) 2016 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _SAMD21_PAC1_INSTANCE_ 45 | #define _SAMD21_PAC1_INSTANCE_ 46 | 47 | /* ========== Register definition for PAC1 peripheral ========== */ 48 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 49 | #define REG_PAC1_WPCLR (0x41000000U) /**< \brief (PAC1) Write Protection Clear */ 50 | #define REG_PAC1_WPSET (0x41000004U) /**< \brief (PAC1) Write Protection Set */ 51 | #else 52 | #define REG_PAC1_WPCLR (*(RwReg *)0x41000000U) /**< \brief (PAC1) Write Protection Clear */ 53 | #define REG_PAC1_WPSET (*(RwReg *)0x41000004U) /**< \brief (PAC1) Write Protection Set */ 54 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 55 | 56 | /* ========== Instance parameters for PAC1 peripheral ========== */ 57 | #define PAC1_WPROT_DEFAULT_VAL 0x00000002 // PAC protection mask at reset 58 | 59 | #endif /* _SAMD21_PAC1_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/sam0/utils/cmsis/samd21/include/instance/pac2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Instance description for PAC2 5 | * 6 | * Copyright (c) 2016 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _SAMD21_PAC2_INSTANCE_ 45 | #define _SAMD21_PAC2_INSTANCE_ 46 | 47 | /* ========== Register definition for PAC2 peripheral ========== */ 48 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 49 | #define REG_PAC2_WPCLR (0x42000000U) /**< \brief (PAC2) Write Protection Clear */ 50 | #define REG_PAC2_WPSET (0x42000004U) /**< \brief (PAC2) Write Protection Set */ 51 | #else 52 | #define REG_PAC2_WPCLR (*(RwReg *)0x42000000U) /**< \brief (PAC2) Write Protection Clear */ 53 | #define REG_PAC2_WPSET (*(RwReg *)0x42000004U) /**< \brief (PAC2) Write Protection Set */ 54 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 55 | 56 | /* ========== Instance parameters for PAC2 peripheral ========== */ 57 | #define PAC2_WPROT_DEFAULT_VAL 0x00800000 // PAC protection mask at reset 58 | 59 | #endif /* _SAMD21_PAC2_INSTANCE_ */ 60 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/sam0/utils/cmsis/samd21/source/system_samd21.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Low-level initialization functions called upon chip startup. 5 | * 6 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | #include "samd21.h" 48 | 49 | /** 50 | * Initial system clock frequency. The System RC Oscillator (RCSYS) provides 51 | * the source for the main clock at chip startup. 52 | */ 53 | #define __SYSTEM_CLOCK (1000000) 54 | 55 | uint32_t SystemCoreClock = __SYSTEM_CLOCK;/*!< System Clock Frequency (Core Clock)*/ 56 | 57 | /** 58 | * Initialize the system 59 | * 60 | * @brief Setup the microcontroller system. 61 | * Initialize the System and update the SystemCoreClock variable. 62 | */ 63 | void SystemInit(void) 64 | { 65 | // Keep the default device state after reset 66 | SystemCoreClock = __SYSTEM_CLOCK; 67 | return; 68 | } 69 | 70 | /** 71 | * Update SystemCoreClock variable 72 | * 73 | * @brief Updates the SystemCoreClock with current core Clock 74 | * retrieved from cpu registers. 75 | */ 76 | void SystemCoreClockUpdate(void) 77 | { 78 | // Not implemented 79 | SystemCoreClock = __SYSTEM_CLOCK; 80 | return; 81 | } 82 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/sam0/utils/cmsis/samd21/source/system_samd21.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Low-level initialization functions called upon chip startup 5 | * 6 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | #ifndef _SYSTEM_SAMD21_H_INCLUDED_ 48 | #define _SYSTEM_SAMD21_H_INCLUDED_ 49 | 50 | #ifdef __cplusplus 51 | extern "C" { 52 | #endif 53 | 54 | #include 55 | 56 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 57 | 58 | void SystemInit(void); 59 | void SystemCoreClockUpdate(void); 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif /* SYSTEM_SAMD21_H_INCLUDED */ 66 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/sam0/utils/preprocessor/preprocessor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Preprocessor utils. 5 | * 6 | * Copyright (C) 2012-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | #ifndef _PREPROCESSOR_H_ 48 | #define _PREPROCESSOR_H_ 49 | 50 | #include "tpaste.h" 51 | #include "stringz.h" 52 | #include "mrepeat.h" 53 | #include "mrecursion.h" 54 | 55 | #endif // _PREPROCESSOR_H_ 56 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/thirdparty/CMSIS/ATMEL-disclaimer.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Only the CMSIS required parts for ASF are included here, go to the below 3 | * address for the full package: 4 | * http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php 5 | * 6 | * The library file thirdparty/CMSIS/Lib/GCC/libarm_cortexM4lf_math_softfp.a was generated by ATMEL, which 7 | * is support -mfloat-abi=softfp compiler flag, and this is also the default selection for device that 8 | * have FPU module and enabled. 9 | * If customer want to use -mfloat-abi=hard compiler flag, the project compile/link flag and link library 10 | * should be manual modified. The library thirdparty/CMSIS/Lib/GCC/libarm_cortexM4lf_math.a is used for 11 | * -mfloat-abi=hard configration. 12 | * 13 | * __CORTEX_SC is not defined for cortex-m0+, and may cause compiler warning, so the include file 14 | * thirdparty/CMSIS/Include/core_cmInstr.h was modified to void such warning. 15 | * Modified from: 16 | * #if (__CORTEX_M >= 0x03) || (__CORTEX_SC >= 300) 17 | * to: 18 | * #if (__CORTEX_M >= 0x03) || ((defined(__CORTEX_SC)) && (__CORTEX_SC >= 300)) 19 | * 20 | */ 21 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/thirdparty/CMSIS/CMSIS_END_USER_LICENCE_AGREEMENT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/boards/samw25/src/ASF/thirdparty/CMSIS/CMSIS_END_USER_LICENCE_AGREEMENT.pdf -------------------------------------------------------------------------------- /boards/samw25/src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM0l_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/boards/samw25/src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM0l_math.a -------------------------------------------------------------------------------- /boards/samw25/src/ASF/thirdparty/CMSIS/Lib/license.txt: -------------------------------------------------------------------------------- 1 | All pre-build libraries contained in the folders "ARM" and "GCC" 2 | are guided by the following license: 3 | 4 | Copyright (C) 2009-2014 ARM Limited. 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 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 distribution. 14 | - Neither the name of ARM nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without 16 | specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE 22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /boards/samw25/src/ASF/thirdparty/CMSIS/README.txt: -------------------------------------------------------------------------------- 1 | * ------------------------------------------------------------------- 2 | * Copyright (C) 2011-2014 ARM Limited. All rights reserved. 3 | * 4 | * Date: 17 February 2014 5 | * Revision: V4.00 6 | * 7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS) 8 | * Title: Release Note for CMSIS 9 | * 10 | * ------------------------------------------------------------------- 11 | 12 | 13 | NOTE - Open the index.html file to access CMSIS documentation 14 | 15 | 16 | The Cortex Microcontroller Software Interface Standard (CMSIS) provides a single standard across all 17 | Cortex-Mx processor series vendors. It enables code re-use and code sharing across software projects 18 | and reduces time-to-market for new embedded applications. 19 | 20 | CMSIS is released under the terms of the end user license agreement ("CMSIS_END_USER_LICENCE_AGREEMENT.pdf"). 21 | Any user of the software package is bound to the terms and conditions of the end user license agreement. 22 | 23 | 24 | You will find the following sub-directories: 25 | 26 | Documentation - Contains CMSIS documentation. 27 | 28 | DSP_Lib - MDK project files, Examples and source files etc.. to build the 29 | CMSIS DSP Software Library for Cortex-M0, Cortex-M3, Cortex-M4 processors. 30 | 31 | Include - CMSIS Core Support and CMSIS DSP Include Files. 32 | 33 | Lib - CMSIS DSP Libraries. 34 | 35 | RTOS - CMSIS RTOS API template header file. 36 | 37 | Driver - CMSIS Peripheral Driver Interface. 38 | 39 | Pack - CMSIS Software Packs. 40 | Mechanism to install software, device support, APIs, and example projects. 41 | 42 | SVD - CMSIS SVD Schema files and Conversion Utility. 43 | -------------------------------------------------------------------------------- /boards/samw25/src/config/conf_board.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM D21 Xplained Pro board configuration. 5 | * 6 | * Copyright (c) 2016 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 26 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 27 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 28 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 29 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 33 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 34 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | * \asf_license_stop 38 | * 39 | */ 40 | 41 | #ifndef CONF_BOARD_H_INCLUDED 42 | #define CONF_BOARD_H_INCLUDED 43 | 44 | #endif /* CONF_BOARD_H_INCLUDED */ 45 | -------------------------------------------------------------------------------- /boards/samw25/src/config/conf_extint.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM External Interrupt Driver Configuration Header 5 | * 6 | * Copyright (C) 2013-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | #ifndef CONF_EXTINT_H_INCLUDED 47 | #define CONF_EXTINT_H_INCLUDED 48 | 49 | # define EXTINT_CLOCK_SOURCE GCLK_GENERATOR_0 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /boards/samw25/src/config/conf_sleepmgr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Chip-specific sleep manager configuration 5 | * 6 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | #ifndef CONF_SLEEPMGR_INCLUDED 47 | #define CONF_SLEEPMGR_INCLUDED 48 | 49 | // Sleep manager options 50 | #define CONFIG_SLEEPMGR_ENABLE 51 | 52 | #endif /* CONF_SLEEPMGR_INCLUDED */ 53 | -------------------------------------------------------------------------------- /boards/samw25/src/config/conf_spi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM SPI configuration 5 | * 6 | * Copyright (C) 2013-2015 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | /* 44 | * Support and FAQ: visit Atmel Support 45 | */ 46 | 47 | 48 | #ifndef CONF_SPI_H_INCLUDED 49 | # define CONF_SPI_H_INCLUDED 50 | 51 | # define CONF_SPI_MASTER_ENABLE true 52 | # define CONF_SPI_SLAVE_ENABLE false 53 | 54 | #endif /* CONF_SPI_H_INCLUDED */ 55 | 56 | -------------------------------------------------------------------------------- /certs/Equifax_Secure_Certificate_Authority.cer: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV 3 | UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy 4 | dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1 5 | MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx 6 | dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B 7 | AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f 8 | BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A 9 | cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC 10 | AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ 11 | MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm 12 | aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw 13 | ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj 14 | IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF 15 | MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA 16 | A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y 17 | 7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh 18 | 1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4 19 | -----END CERTIFICATE----- -------------------------------------------------------------------------------- /certs/GTS_Root_R1.cer: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFWjCCA0KgAwIBAgIQbkepxUtHDA3sM9CJuRz04TANBgkqhkiG9w0BAQwFADBH 3 | MQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExM 4 | QzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIy 5 | MDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNl 6 | cnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIiMA0GCSqGSIb3DQEB 7 | AQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx9vaM 8 | f/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vX 9 | mX7wCl7raKb0xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7 10 | zUjwTcLCeoiKu7rPWRnWr4+wB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0P 11 | fyblqAj+lug8aJRT7oM6iCsVlgmy4HqMLnXWnOunVmSPlk9orj2XwoSPwLxAwAtc 12 | vfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly4cpk9+aCEI3oncKKiPo4 13 | Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr06zqkUsp 14 | zBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOO 15 | Rc92wO1AK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYW 16 | k70paDPvOmbsB4om3xPXV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+ 17 | DVrNVjzRlwW5y0vtOUucxD/SVRNuJLDWcfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgF 18 | lQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV 19 | HQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEMBQADggIBADiW 20 | Cu49tJYeX++dnAsznyvgyv3SjgofQXSlfKqE1OXyHuY3UjKcC9FhHb8owbZEKTV1 21 | d5iyfNm9dKyKaOOpMQkpAWBz40d8U6iQSifvS9efk+eCNs6aaAyC58/UEBZvXw6Z 22 | XPYfcX3v73svfuo21pdwCxXu11xWajOl40k4DLh9+42FpLFZXvRq4d2h9mREruZR 23 | gyFmxhE+885H7pwoHyXa/6xmld01D1zvICxi/ZG6qcz8WpyTgYMpl0p8WnK0OdC3 24 | d8t5/Wk6kjftbjhlRn7pYL15iJdfOBL07q9bgsiG1eGZbYwE8na6SfZu6W0eX6Dv 25 | J4J2QPim01hcDyxC2kLGe4g0x8HYRZvBPsVhHdljUEn2NIVq4BjFbkerQUIpm/Zg 26 | DdIx02OYI5NaAIFItO/Nis3Jz5nu2Z6qNuFoS3FJFDYoOj0dzpqPJeaAcWErtXvM 27 | +SUWgeExX6GjfhaknBZqlxi9dnKlC54dNuYvoS++cJEPqOba+MSSQGwlfnuzCdyy 28 | F62ARPBopY+Udf90WuioAnwMCeKpSwughQtiue+hMZL77/ZRBIls6Kl0obsXs7X9 29 | SQ98POyDGCBDTtWTurQ0sR8WNh8M5mQ5Fkzc4P4dyKliPUDqysU0ArSuiYgzNdws 30 | E3PYJ/HQcu51OyLemGhmW/HGY0dVHLqlCFF1pkgl 31 | -----END CERTIFICATE----- -------------------------------------------------------------------------------- /certs/GTS_Root_R2.cer: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFWjCCA0KgAwIBAgIQbkepxlqz5yDFMJo/aFLybzANBgkqhkiG9w0BAQwFADBH 3 | MQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExM 4 | QzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIy 5 | MDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNl 6 | cnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEB 7 | AQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTukk3Lv 8 | CvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3Kg 9 | GjSY6Dlo7JUle3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9Bu 10 | XvAuMC6C/Pq8tBcKSOWIm8Wba96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOd 11 | re7kRXuJVfeKH2JShBKzwkCX44ofR5GmdFrS+LFjKBC4swm4VndAoiaYecb+3yXu 12 | PuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbuak7MkogwTZq9TwtImoS1 13 | mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscszcTJGr61K 14 | 8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqj 15 | x5RWIr9qS34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsR 16 | nTKaG73VululycslaVNVJ1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0 17 | kzCqgc7dGtxRcw1PcOnlthYhGXmy5okLdWTK1au8CcEYof/UVKGFPP0UJAOyh9Ok 18 | twIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV 19 | HQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEMBQADggIBALZp 20 | 8KZ3/p7uC4Gt4cCpx/k1HUCCq+YEtN/L9x0Pg/B+E02NjO7jMyLDOfxA325BS0JT 21 | vhaI8dI4XsRomRyYUpOM52jtG2pzegVATX9lO9ZY8c6DR2Dj/5epnGB3GFW1fgiT 22 | z9D2PGcDFWEJ+YF59exTpJ/JjwGLc8R3dtyDovUMSRqodt6Sm2T4syzFJ9MHwAiA 23 | pJiS4wGWAqoC7o87xdFtCjMwc3i5T1QWvwsHoaRc5svJXISPD+AVdyx+Jn7axEvb 24 | pxZ3B7DNdehyQtaVhJ2Gg/LkkM0JR9SLA3DaWsYDQvTtN6LwG1BUSw7YhN4ZKJmB 25 | R64JGz9I0cNv4rBgF/XuIwKl2gBbbZCr7qLpGzvpx0QnRY5rn/WkhLx3+WuXrD5R 26 | RaIRpsyF7gpo8j5QOHokYh4XIDdtak23CZvJ/KRY9bb7nE4Yu5UC56GtmwfuNmsk 27 | 0jmGwZODUNKBRqhfYlcsu2xkiAhu7xNUX90txGdj08+JN7+dIPT7eoOboB6BAFDC 28 | 5AwiWVIQ7UNWhwD4FFKnHYuTjKJNRn8nxnGbJN7k2oaLDX5rIMHAnuFl2GqjpuiF 29 | izoHCBy69Y9Vmhh1fuXsgWbRIXOhNUQLgD1bnF5vKheW0YMjiGZt5obicDIvUiLn 30 | yOd/xCxgXS/Dr55FBcOEArf9LAhST4Ldo/DUhgkC 31 | -----END CERTIFICATE----- -------------------------------------------------------------------------------- /certs/GlobalSignRoot.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/certs/GlobalSignRoot.cer -------------------------------------------------------------------------------- /certs/GlobalSignRoot2.cer: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G 3 | A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp 4 | Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1 5 | MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG 6 | A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI 7 | hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL 8 | v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8 9 | eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq 10 | tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd 11 | C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa 12 | zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB 13 | mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH 14 | V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n 15 | bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG 16 | 3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs 17 | J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO 18 | 291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS 19 | ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd 20 | AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7 21 | TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== 22 | -----END CERTIFICATE----- -------------------------------------------------------------------------------- /certs/README.md: -------------------------------------------------------------------------------- 1 | ## Google Root Certificates 2 | 3 | In order for the WINC TLS stack to connect to the google endpoint the root certs Google is using must be loaded into the module first since those roots are not included by default 4 | 5 | These certs have extracted from the office source: [Google Root Certs](https://pki.goog/roots.pem) 6 | 7 | Because the official list of root certs is far too large to be loaded entirely only a subset of them have been provided here. These have been shown to work generally but if the 8 | examples fail to connect adding the socket option "SO_SSL_BYPASS_X509_VERIF" will skip the certificate chain verification. If the example connects then it confirms the root certificate 9 | is not loaded properly. Observing the diagnostic output of WINC module by connecting "UART DEBUG" to a uart will show which certificate failed to validate. See the 10 | [WINC1500 Xplained Pro User Guide](http://www.atmel.com/Images/Atmel-42388-ATWINC1500-Xplained-Pro_UserGuide.pdf) for more details on the uart diagnostic port. 11 | 12 | These certificates will have to be copied to your WINC1500 firmware update project in the following path. 13 | 14 | ### \\src\firmware\Tools\root_certificate_downloader\binary 15 | 16 | The firmware loader will likely require you to remove some existing certificates in order to make room. Which certificates you elect to keep will depend on your application. -------------------------------------------------------------------------------- /scripts/at_pubkey.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import hid 3 | from at_kit_base import * 4 | import base64 5 | 6 | # Initialize the Kit Instance 7 | dev = KitDevice(hid.device()) 8 | dev.open() 9 | 10 | id = dev.kit_list(0) 11 | 12 | # Select the device to communicate with 13 | dev.kit_select(id) 14 | 15 | # Send the command 16 | resp = dev.kit_command(64, 0, 0, timeout_ms=5000) 17 | 18 | public_key = bytearray.fromhex('3059301306072A8648CE3D020106082A8648CE3D03010703420004') + bytearray.fromhex(resp['data'][2:-4]) 19 | public_key = '-----BEGIN PUBLIC KEY-----\n' + base64.b64encode(public_key).decode('ascii') + '\n-----END PUBLIC KEY-----' 20 | 21 | print(public_key) 22 | -------------------------------------------------------------------------------- /scripts/at_set_time.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import hid 4 | import struct 5 | import datetime 6 | 7 | from at_kit_base import * 8 | 9 | dev = KitDevice(hid.device()) 10 | dev.open() 11 | 12 | now = datetime.datetime.utcnow() 13 | 14 | data = struct.pack("= 2.3 3 | hidapi 4 | google-cloud-pubsub 5 | -------------------------------------------------------------------------------- /scripts/shield.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrochipTech/gcp-iot-core-examples/938321f643e737bbe98b3737ec08ae1aa7411d4e/scripts/shield.ico -------------------------------------------------------------------------------- /src/client_task.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * \brief Client Application (MQTT) Task & Controller 4 | * 5 | * \copyright (c) 2017 Microchip Technology Inc. and its subsidiaries. 6 | * You may use this software and any derivatives exclusively with 7 | * Microchip products. 8 | * 9 | * \page License 10 | * 11 | * (c) 2017 Microchip Technology Inc. and its subsidiaries. You may use this 12 | * software and any derivatives exclusively with Microchip products. 13 | * 14 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER 15 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED 16 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A 17 | * PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION 18 | * WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION. 19 | * 20 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, 21 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND 22 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS 23 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE 24 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIPS TOTAL LIABILITY ON ALL CLAIMS IN 25 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, 26 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. 27 | * 28 | * MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE 29 | * TERMS. 30 | */ 31 | 32 | #ifndef CLIENT_TASK_H_ 33 | #define CLIENT_TASK_H_ 34 | 35 | #define CLIENT_REPORT_PERIOD_DEFAULT (5000) 36 | 37 | #define CLIENT_MQTT_MAX_HOST_URI (100) 38 | 39 | #define CLIENT_MQTT_TIMEOUT_MS (2000) 40 | #define MQTT_YEILD_TIMEOUT_MS (500) 41 | #define MQTT_KEEP_ALIVE_INTERVAL_S (900) 42 | 43 | #define CLIENT_MQTT_RX_BUF_SIZE (1024) 44 | #define CLIENT_MQTT_TX_BUF_SIZE (1024) 45 | 46 | void client_task(void); 47 | void client_timer_update(void); 48 | 49 | 50 | #endif /* CLIENT_TASK_H_ */ -------------------------------------------------------------------------------- /src/devices/thermo5_click.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * \brief Thermo 5 Click Driver (EMC1414) 4 | * 5 | * \copyright (c) 2017 Microchip Technology Inc. and its subsidiaries. 6 | * You may use this software and any derivatives exclusively with 7 | * Microchip products. 8 | * 9 | * \page License 10 | * 11 | * (c) 2017 Microchip Technology Inc. and its subsidiaries. You may use this 12 | * software and any derivatives exclusively with Microchip products. 13 | * 14 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER 15 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED 16 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A 17 | * PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION 18 | * WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION. 19 | * 20 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, 21 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND 22 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS 23 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE 24 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIPS TOTAL LIABILITY ON ALL CLAIMS IN 25 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, 26 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. 27 | * 28 | * MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE 29 | * TERMS. 30 | */ 31 | 32 | #ifndef THERMO5_CLICK_H_ 33 | #define THERMO5_CLICK_H_ 34 | 35 | uint32_t th5_read_sensor(uint8_t sensor); 36 | 37 | #endif /* THERMO5_CLICK_H_ */ -------------------------------------------------------------------------------- /src/paho_mqtt_embedded_c/MQTTPacket/MQTTFormat.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2014 IBM Corp. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v1.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * Ian Craggs - initial API and implementation and/or initial documentation 15 | *******************************************************************************/ 16 | 17 | #if !defined(MQTTFORMAT_H) 18 | #define MQTTFORMAT_H 19 | 20 | #include "StackTrace.h" 21 | #include "MQTTPacket.h" 22 | 23 | const char* MQTTPacket_getName(unsigned short packetid); 24 | int MQTTStringFormat_connect(char* strbuf, int strbuflen, MQTTPacket_connectData* data); 25 | int MQTTStringFormat_connack(char* strbuf, int strbuflen, unsigned char connack_rc, unsigned char sessionPresent); 26 | int MQTTStringFormat_publish(char* strbuf, int strbuflen, unsigned char dup, int qos, unsigned char retained, 27 | unsigned short packetid, MQTTString topicName, unsigned char* payload, int payloadlen); 28 | int MQTTStringFormat_ack(char* strbuf, int strbuflen, unsigned char packettype, unsigned char dup, unsigned short packetid); 29 | int MQTTStringFormat_subscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid, int count, 30 | MQTTString topicFilters[], int requestedQoSs[]); 31 | int MQTTStringFormat_suback(char* strbuf, int strbuflen, unsigned short packetid, int count, int* grantedQoSs); 32 | int MQTTStringFormat_unsubscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid, 33 | int count, MQTTString topicFilters[]); 34 | char* MQTTFormat_toClientString(char* strbuf, int strbuflen, unsigned char* buf, int buflen); 35 | char* MQTTFormat_toServerString(char* strbuf, int strbuflen, unsigned char* buf, int buflen); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/paho_mqtt_embedded_c/MQTTPacket/MQTTPublish.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2014 IBM Corp. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v1.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * Ian Craggs - initial API and implementation and/or initial documentation 15 | * Xiang Rong - 442039 Add makefile to Embedded C client 16 | *******************************************************************************/ 17 | 18 | #ifndef MQTTPUBLISH_H_ 19 | #define MQTTPUBLISH_H_ 20 | 21 | #if !defined(DLLImport) 22 | #define DLLImport 23 | #endif 24 | #if !defined(DLLExport) 25 | #define DLLExport 26 | #endif 27 | 28 | DLLExport int MQTTSerialize_publish(unsigned char* buf, int buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid, 29 | MQTTString topicName, unsigned char* payload, int payloadlen); 30 | 31 | DLLExport int MQTTDeserialize_publish(unsigned char* dup, int* qos, unsigned char* retained, unsigned short* packetid, MQTTString* topicName, 32 | unsigned char** payload, int* payloadlen, unsigned char* buf, int len); 33 | 34 | DLLExport int MQTTSerialize_puback(unsigned char* buf, int buflen, unsigned short packetid); 35 | DLLExport int MQTTSerialize_pubrel(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid); 36 | DLLExport int MQTTSerialize_pubcomp(unsigned char* buf, int buflen, unsigned short packetid); 37 | 38 | #endif /* MQTTPUBLISH_H_ */ 39 | -------------------------------------------------------------------------------- /src/paho_mqtt_embedded_c/MQTTPacket/MQTTSubscribe.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2014 IBM Corp. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v1.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * Ian Craggs - initial API and implementation and/or initial documentation 15 | * Xiang Rong - 442039 Add makefile to Embedded C client 16 | *******************************************************************************/ 17 | 18 | #ifndef MQTTSUBSCRIBE_H_ 19 | #define MQTTSUBSCRIBE_H_ 20 | 21 | #if !defined(DLLImport) 22 | #define DLLImport 23 | #endif 24 | #if !defined(DLLExport) 25 | #define DLLExport 26 | #endif 27 | 28 | DLLExport int MQTTSerialize_subscribe(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid, 29 | int count, MQTTString topicFilters[], int requestedQoSs[]); 30 | 31 | DLLExport int MQTTDeserialize_subscribe(unsigned char* dup, unsigned short* packetid, 32 | int maxcount, int* count, MQTTString topicFilters[], int requestedQoSs[], unsigned char* buf, int len); 33 | 34 | DLLExport int MQTTSerialize_suback(unsigned char* buf, int buflen, unsigned short packetid, int count, int* grantedQoSs); 35 | 36 | DLLExport int MQTTDeserialize_suback(unsigned short* packetid, int maxcount, int* count, int grantedQoSs[], unsigned char* buf, int len); 37 | 38 | 39 | #endif /* MQTTSUBSCRIBE_H_ */ 40 | -------------------------------------------------------------------------------- /src/paho_mqtt_embedded_c/MQTTPacket/MQTTUnsubscribe.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2014 IBM Corp. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v1.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * Ian Craggs - initial API and implementation and/or initial documentation 15 | * Xiang Rong - 442039 Add makefile to Embedded C client 16 | *******************************************************************************/ 17 | 18 | #ifndef MQTTUNSUBSCRIBE_H_ 19 | #define MQTTUNSUBSCRIBE_H_ 20 | 21 | #if !defined(DLLImport) 22 | #define DLLImport 23 | #endif 24 | #if !defined(DLLExport) 25 | #define DLLExport 26 | #endif 27 | 28 | DLLExport int MQTTSerialize_unsubscribe(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid, 29 | int count, MQTTString topicFilters[]); 30 | 31 | DLLExport int MQTTDeserialize_unsubscribe(unsigned char* dup, unsigned short* packetid, int max_count, int* count, MQTTString topicFilters[], 32 | unsigned char* buf, int len); 33 | 34 | DLLExport int MQTTSerialize_unsuback(unsigned char* buf, int buflen, unsigned short packetid); 35 | 36 | DLLExport int MQTTDeserialize_unsuback(unsigned short* packetid, unsigned char* buf, int len); 37 | 38 | #endif /* MQTTUNSUBSCRIBE_H_ */ 39 | -------------------------------------------------------------------------------- /src/paho_mqtt_embedded_c/README.md: -------------------------------------------------------------------------------- 1 | # Eclipse Paho MQTT C/C++ client for Embedded platforms 2 | 3 | This repository contains the source code for the [Eclipse Paho](http://eclipse.org/paho) MQTT C/C++ client library for Embedded platorms. 4 | 5 | It is dual licensed under the EPL and EDL (see about.html and notice.html for more details). You can choose which of these licenses you want to use the code under. The EDL allows you to embed the code into your application, and distribute your application in binary or source form without contributing any of your code, or any changes you make back to Paho. See the EDL for the exact conditions. 6 | 7 | The MQTTPacket directory contains the lowest level C library with the smallest requirements. This supplies simple serialization 8 | and deserialization routines. It is mainly up to you to write and read to and from the network. 9 | 10 | The MQTTClient directory contains the next level C++ library. This still avoids most networking code so that you can plugin the 11 | network of your choice. 12 | 13 | ## Build requirements / compilation 14 | 15 | There are helper scripts (build...) in various directories. The client library is a set of building blocks which you pick and choose from, so that the smallest MQTT application can be built. 16 | 17 | ## Usage and API 18 | 19 | See the samples directory for examples of intended use. 20 | 21 | 22 | ## Runtime tracing 23 | 24 | As yet, there is no tracing. For the smallest client, should we have tracing? 25 | 26 | 27 | ## Reporting bugs 28 | 29 | This project uses GitHub Issues here: [github.com/eclipse/paho.mqtt.embedded-c/issues](https://github.com/eclipse/paho.mqtt.embedded-c/issues) to track ongoing development and issues. 30 | 31 | ## More information 32 | 33 | Discussion of the Paho clients takes place on the [Eclipse paho-dev mailing list](https://dev.eclipse.org/mailman/listinfo/paho-dev). 34 | 35 | General questions about the MQTT protocol are discussed in the [MQTT Google Group](https://groups.google.com/forum/?hl=en-US&fromgroups#!forum/mqtt). 36 | 37 | There is much more information available via the [MQTT community site](http://mqtt.org). 38 | -------------------------------------------------------------------------------- /src/paho_mqtt_embedded_c/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | About 5 | 6 | 7 |

About This Content

8 | 9 |

December 9, 2013

10 |

License

11 | 12 |

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise 13 | indicated below, the Content is provided to you under the terms and conditions of the 14 | Eclipse Public License Version 1.0 ("EPL") and Eclipse Distribution License Version 1.0 ("EDL"). 15 | A copy of the EPL is available at 16 | http://www.eclipse.org/legal/epl-v10.html 17 | and a copy of the EDL is available at 18 | http://www.eclipse.org/org/documents/edl-v10.php. 19 | For purposes of the EPL, "Program" will mean the Content.

20 | 21 |

If you did not receive this Content directly from the Eclipse Foundation, the Content is 22 | being redistributed by another party ("Redistributor") and different terms and conditions may 23 | apply to your use of any object code in the Content. Check the Redistributor's license that was 24 | provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise 25 | indicated below, the terms and conditions of the EPL still apply to any source code in the Content 26 | and such source code may be obtained at http://www.eclipse.org.

27 | 28 | 29 | -------------------------------------------------------------------------------- /src/paho_mqtt_embedded_c/edl-v10: -------------------------------------------------------------------------------- 1 | 2 | Eclipse Distribution License - v 1.0 3 | 4 | Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. 5 | 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 9 | 10 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 11 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 12 | Neither the name of the Eclipse Foundation, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15 | 16 | -------------------------------------------------------------------------------- /src/paho_mqtt_embedded_c/platform/network_interface.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * \file 4 | * 5 | * \brief Platform network interface 6 | * 7 | * Copyright (c) 2014-2016 Atmel Corporation. All rights reserved. 8 | * 9 | * \asf_license_start 10 | * 11 | * \page License 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions are met: 15 | * 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 19 | * 2. Redistributions in binary form must reproduce the above copyright notice, 20 | * this list of conditions and the following disclaimer in the documentation 21 | * and/or other materials provided with the distribution. 22 | * 23 | * 3. The name of Atmel may not be used to endorse or promote products derived 24 | * from this software without specific prior written permission. 25 | * 26 | * 4. This software may only be redistributed and used in connection with an 27 | * Atmel microcontroller product. 28 | * 29 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 30 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 32 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 33 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 34 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 35 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 37 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 38 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 39 | * POSSIBILITY OF SUCH DAMAGE. 40 | * 41 | * \asf_license_stop 42 | * 43 | */ 44 | 45 | #ifndef MQTT_NETWORK_INTERFACE_H 46 | #define MQTT_NETWORK_INTERFACE_H 47 | 48 | #include 49 | 50 | typedef struct mqtt_network { 51 | int (*mqttread)(struct mqtt_network *network, unsigned char *read_buffer, int length, int timeout_ms); 52 | int (*mqttwrite)(struct mqtt_network *network, unsigned char *send_buffer, int length, int timeout_ms); 53 | } Network; 54 | 55 | int mqtt_packet_read(Network *network, unsigned char *read_buffer, int length, int timeout_ms); 56 | int mqtt_packet_write(Network *network, unsigned char *send_buffer, int length, int timeout_ms); 57 | 58 | #endif // MQTT_NETWORK_INTERFACE_H -------------------------------------------------------------------------------- /src/parson_json/Parson JSON License.txt: -------------------------------------------------------------------------------- 1 | Parson ( http://kgabis.github.com/parson/ ) 2 | Copyright (c) 2012 - 2015 Krzysztof Gabis 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /src/sensor_task.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * \brief Sensor Monitoring and Logic 4 | * 5 | * \copyright (c) 2017 Microchip Technology Inc. and its subsidiaries. 6 | * You may use this software and any derivatives exclusively with 7 | * Microchip products. 8 | * 9 | * \page License 10 | * 11 | * (c) 2017 Microchip Technology Inc. and its subsidiaries. You may use this 12 | * software and any derivatives exclusively with Microchip products. 13 | * 14 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER 15 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED 16 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A 17 | * PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION 18 | * WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION. 19 | * 20 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, 21 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND 22 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS 23 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE 24 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIPS TOTAL LIABILITY ON ALL CLAIMS IN 25 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, 26 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. 27 | * 28 | * MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE 29 | * TERMS. 30 | */ 31 | 32 | #ifndef SENSOR_TASK_H_ 33 | #define SENSOR_TASK_H_ 34 | 35 | #include "config.h" 36 | 37 | void sensor_task(void); 38 | uint32_t sensor_get_temperature(void); 39 | uint16_t sensor_get_fan_speed(void); 40 | 41 | #ifdef CONFIG_USE_JSON_LIB 42 | #include "parson.h" 43 | bool update_settings_from_json(JSON_Array * json_map); 44 | bool override_from_json(JSON_Object * json_override_object); 45 | #endif 46 | 47 | #endif /* SENSOR_TASK_H_ */ -------------------------------------------------------------------------------- /src/time_utils.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * \brief Date/Time Utilities (RTC) 4 | * 5 | * \copyright (c) 2017 Microchip Technology Inc. and its subsidiaries. 6 | * You may use this software and any derivatives exclusively with 7 | * Microchip products. 8 | * 9 | * \page License 10 | * 11 | * (c) 2017 Microchip Technology Inc. and its subsidiaries. You may use this 12 | * software and any derivatives exclusively with Microchip products. 13 | * 14 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER 15 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED 16 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A 17 | * PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION 18 | * WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION. 19 | * 20 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, 21 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND 22 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS 23 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE 24 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIPS TOTAL LIABILITY ON ALL CLAIMS IN 25 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, 26 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. 27 | * 28 | * MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE 29 | * TERMS. 30 | */ 31 | 32 | #ifndef TIME_UTILS_H_ 33 | #define TIME_UTILS_H_ 34 | 35 | uint32_t time_utils_get_utc(void); 36 | 37 | uint32_t time_utils_convert(uint32_t year, uint32_t month, uint32_t day, uint32_t hour, uint32_t minute, uint32_t second); 38 | void time_utils_set(uint32_t year, uint32_t month, uint32_t day, uint32_t hour, uint32_t minute, uint32_t second); 39 | 40 | 41 | #endif /* TIME_UTILS_H_ */ -------------------------------------------------------------------------------- /src/tiny_state_machine.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tiny_state_machine.h 3 | */ 4 | 5 | 6 | #ifndef TINY_STATE_MACHINE_H_ 7 | #define TINY_STATE_MACHINE_H_ 8 | 9 | /* Define to include state names */ 10 | #define TINY_STATE_MACHINE_WITH_NAMES 11 | 12 | /* Time & Space Efficient State machine handler */ 13 | 14 | /* Define the generic state element */ 15 | typedef struct { 16 | uint32_t _s; /**< State Value */ 17 | #ifdef TINY_STATE_MACHINE_WITH_NAMES 18 | const char* _n; /**< State Name */ 19 | #endif 20 | void (*_f)(void*); /**< State Function */ 21 | } tiny_state_def; 22 | 23 | /* Define the basic state machine context */ 24 | typedef struct { 25 | uint16_t state; 26 | uint16_t count; 27 | tiny_state_def* states; 28 | } tiny_state_ctx; 29 | 30 | /* The most stripped down state machine driver you can create */ 31 | static void inline tiny_state_init(void* context, tiny_state_def *states, uint16_t count, uint16_t initial) 32 | { 33 | ((tiny_state_ctx*)context)->states = states; 34 | ((tiny_state_ctx*)context)->count = count; 35 | ((tiny_state_ctx*)context)->state = initial; 36 | } 37 | 38 | /* Search through a states list for the match */ 39 | static tiny_state_def * tiny_state_find(tiny_state_def *states, uint16_t count, uint16_t state) 40 | { 41 | uint16_t i; 42 | for(i=0;istates, pCtx->count, pCtx->state); 57 | if(pState && pState->_f) 58 | { 59 | pState->_f(context); 60 | } 61 | } 62 | 63 | /* Update the next state */ 64 | static void inline tiny_state_update(void* context, uint32_t next) 65 | { 66 | ((tiny_state_ctx*)context)->state = next; 67 | } 68 | 69 | /* Retrieve the name of the state */ 70 | static const char* tiny_state_name(void* context, uint32_t state) 71 | { 72 | #ifdef TINY_STATE_MACHINE_WITH_NAMES 73 | tiny_state_ctx * pCtx = (tiny_state_ctx*)context; 74 | tiny_state_def * pState = tiny_state_find(pCtx->states, pCtx->count, state); 75 | 76 | return (pState && pState->_n)?pState->_n:""; 77 | #else 78 | return ""; 79 | #endif 80 | } 81 | 82 | /* Helper macros */ 83 | #ifdef TINY_STATE_MACHINE_WITH_NAMES 84 | #define TINY_STATE_DEF(x,y) {x, #x, y} 85 | #else 86 | #define TINY_STATE_DEF(x,y) {x, y} 87 | #endif 88 | 89 | 90 | #endif /* TINY_STATE_MACHINE_H_ */ -------------------------------------------------------------------------------- /src/usb_hid.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * \file 4 | * 5 | * \brief USB HID Functions 6 | * 7 | * Copyright (c) 2016-2017 Atmel Corporation. All rights reserved. 8 | * 9 | * \asf_license_start 10 | * 11 | * \page License 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions are met: 15 | * 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 19 | * 2. Redistributions in binary form must reproduce the above copyright notice, 20 | * this list of conditions and the following disclaimer in the documentation 21 | * and/or other materials provided with the distribution. 22 | * 23 | * 3. The name of Atmel may not be used to endorse or promote products derived 24 | * from this software without specific prior written permission. 25 | * 26 | * 4. This software may only be redistributed and used in connection with an 27 | * Atmel microcontroller product. 28 | * 29 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 30 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 32 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 33 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 34 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 35 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 37 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 38 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 39 | * POSSIBILITY OF SUCH DAMAGE. 40 | * 41 | * \asf_license_stop 42 | * 43 | */ 44 | 45 | #ifndef USB_HID_H 46 | #define USB_HID_H 47 | 48 | #include 49 | #include 50 | 51 | #include "atca_kit_client.h" 52 | 53 | extern uint8_t g_usb_buffer[KIT_MESSAGE_SIZE_MAX]; //! The USB message buffer 54 | extern uint16_t g_usb_buffer_length; //! The USB message buffer length 55 | extern uint32_t g_usb_message_received; //! Whether the USB message was received 56 | 57 | void usb_hid_init(void); 58 | 59 | bool usb_send_response_message(uint8_t *response, uint16_t response_length); 60 | 61 | bool usb_hid_enable_callback(void); 62 | void usb_hid_disable_callback(void); 63 | 64 | void usb_hid_wakeup_callback(void); 65 | 66 | void usb_hid_report_out_callback(uint8_t *report); 67 | void usb_hid_set_feature_callback(uint8_t *report); 68 | 69 | #endif // USB_HID_H -------------------------------------------------------------------------------- /src/wifi_task.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * \brief WIFI Management and Abstraction (WINC1500) 4 | * 5 | * \copyright (c) 2017 Microchip Technology Inc. and its subsidiaries. 6 | * You may use this software and any derivatives exclusively with 7 | * Microchip products. 8 | * 9 | * \page License 10 | * 11 | * (c) 2017 Microchip Technology Inc. and its subsidiaries. You may use this 12 | * software and any derivatives exclusively with Microchip products. 13 | * 14 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER 15 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED 16 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A 17 | * PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION 18 | * WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION. 19 | * 20 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, 21 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND 22 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS 23 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE 24 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIPS TOTAL LIABILITY ON ALL CLAIMS IN 25 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, 26 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. 27 | * 28 | * MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE 29 | * TERMS. 30 | */ 31 | 32 | #ifndef WIFI_TASK_H_ 33 | #define WIFI_TASK_H_ 34 | 35 | /* WIFI Control Configuration */ 36 | 37 | /** Maximum Allowed SSID Length */ 38 | #define WIFI_MAX_SSID_SIZE 32 39 | 40 | /** Maximum Allowed Password Length */ 41 | #define WIFI_MAX_PASS_SIZE 64 42 | 43 | /** Maximum Static RX buffer to use */ 44 | #define WIFI_BUFFER_SIZE (1500) 45 | 46 | /* Wait times are specified in milliseconds */ 47 | #define WIFI_COUNTER_NO_WAIT 0 48 | #define WIFI_COUNTER_GET_TIME_WAIT 10000 49 | #define WIFI_COUNTER_CONNECT_WAIT 10000 50 | #define WIFI_COUNTER_RECONNECT_WAIT 30000 51 | 52 | /* WIFI Control API */ 53 | void wifi_task(void); 54 | void wifi_timer_update(void); 55 | int wifi_is_ready(void); 56 | int wifi_is_busy(void); 57 | int wifi_has_error(void); 58 | 59 | /* WIFI Feature API */ 60 | void wifi_request_time(void); 61 | 62 | /* WIFI Socket Handling API */ 63 | int wifi_connect(char * host, int port); 64 | int wifi_read_data(uint8_t *read_buffer, uint32_t read_length, uint32_t timeout_ms); 65 | int wifi_send_data(uint8_t *send_buffer, uint32_t send_length, uint32_t timeout_ms); 66 | 67 | #endif /* WIFI_TASK_H_ */ --------------------------------------------------------------------------------