diff --git a/Smol Watch Project/My Project/.atmelstart/AtmelStart.gpdsc b/Smol Watch Project/My Project/.atmelstart/AtmelStart.gpdsc
index 6951bd5..cdb8e51 100644
--- a/Smol Watch Project/My Project/.atmelstart/AtmelStart.gpdsc
+++ b/Smol Watch Project/My Project/.atmelstart/AtmelStart.gpdsc
@@ -101,6 +101,7 @@
+
@@ -183,8 +184,8 @@
-
-
+
+
@@ -201,7 +202,6 @@
-
diff --git a/Smol Watch Project/My Project/.atmelstart/atmel_start_config.atstart b/Smol Watch Project/My Project/.atmelstart/atmel_start_config.atstart
index 9108ee8..4604d2b 100644
--- a/Smol Watch Project/My Project/.atmelstart/atmel_start_config.atstart
+++ b/Smol Watch Project/My Project/.atmelstart/atmel_start_config.atstart
@@ -861,27 +861,53 @@ drivers:
domain_group: null
PWM_0:
user_label: PWM_0
- definition: Atmel:SAML22_Drivers:0.0.1::SAML22J18A-AN::TC3::driver_config_definition::PWM::HAL:Driver:PWM
+ definition: Atmel:SAML22_Drivers:0.0.1::SAML22J18A-AN::TC3::driver_config_definition::8-bit.Waveform.Mode::Lite:TC:PWM
functionality: PWM
- api: HAL:Driver:PWM
+ api: Lite:TC:PWM
configuration:
- tc_arch_alock: The Lock Update bit is not affected on overflow/underflow and
- re-trigger event
- tc_arch_dbgrun: false
- tc_arch_evact: Event action disabled
- tc_arch_mceo0: false
- tc_arch_mceo1: false
- tc_arch_ondemand: false
- tc_arch_ovfeo: false
- tc_arch_presync: Reload or reset counter on next GCLK
- tc_arch_runstdby: false
- tc_arch_tcei: false
- tc_arch_tcinv: false
- tc_arch_wave_duty_val: 500
- tc_arch_wave_per_val: 1000
- tc_mode: Counter in 16-bit mode
- tc_prescaler: No division
- timer_event_control: false
+ cc_cc0: 0
+ cc_cc1: 0
+ cc_control: false
+ count_control: false
+ count_count: 0
+ ctrla_alock: false
+ ctrla_capten0: false
+ ctrla_capten1: false
+ ctrla_control: false
+ ctrla_copen0: false
+ ctrla_copen1: false
+ ctrla_enable: true
+ ctrla_mode: 1
+ ctrla_ondemand: false
+ ctrla_prescaler: DIV1
+ ctrla_prescsync: GCLK
+ ctrla_runstdby: false
+ ctrlbset_cmd: NONE
+ ctrlbset_control: false
+ ctrlbset_dir: false
+ ctrlbset_lupd: false
+ ctrlbset_oneshot: false
+ ctrlc_inven0: false
+ ctrlc_inven1: false
+ dbgctrl_control: false
+ dbgctrl_dbgrun: false
+ drvctrl_control: false
+ evctrl_control: false
+ evctrl_evact: 'OFF'
+ evctrl_mceo0: false
+ evctrl_mceo1: false
+ evctrl_ovfeo: false
+ evctrl_tcei: false
+ evctrl_tcinv: false
+ intenset_control: false
+ intenset_err: false
+ intenset_mc0: false
+ intenset_mc1: false
+ intenset_ovf: false
+ per_control: false
+ per_per: 0
+ wave_control: false
+ wave_wavegen: NFRQ
optional_signals:
- identifier: PWM_0:WO/0
pad: PA20
diff --git a/Smol Watch Project/My Project/Config/hpl_tc_config.h b/Smol Watch Project/My Project/Config/hpl_tc_config.h
deleted file mode 100644
index 61e5b1b..0000000
--- a/Smol Watch Project/My Project/Config/hpl_tc_config.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/* Auto-generated config file hpl_tc_config.h */
-#ifndef HPL_TC_CONFIG_H
-#define HPL_TC_CONFIG_H
-
-// <<< Use Configuration Wizard in Context Menu >>>
-
-#include
-
-#ifndef CONF_TC3_ENABLE
-#define CONF_TC3_ENABLE 1
-#endif
-
-// Basic settings
-// Prescaler
-// <0=> No division
-// <1=> Divide by 2
-// <2=> Divide by 4
-// <3=> Divide by 8
-// <4=> Divide by 16
-// <5=> Divide by 64
-// <6=> Divide by 256
-// <7=> Divide by 1024
-// This defines the prescaler value
-// tc_prescaler
-#ifndef CONF_TC3_PRESCALER
-#define CONF_TC3_PRESCALER 0
-#endif
-//
-
-// PWM Waveform Output settings
-// Waveform Period Value (uS) <0x00-0xFFFFFFFF>
-// The unit of this value is us.
-// tc_arch_wave_per_val
-#ifndef CONF_TC3_WAVE_PER_VAL
-#define CONF_TC3_WAVE_PER_VAL 0x3e8
-#endif
-
-// Waveform Duty Value (0.1%) <0x00-0x03E8>
-// The unit of this value is 1/1000.
-// tc_arch_wave_duty_val
-#ifndef CONF_TC3_WAVE_DUTY_VAL
-#define CONF_TC3_WAVE_DUTY_VAL 0x1f4
-#endif
-
-/* Caculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */
-#if CONF_TC3_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val
-#define CONF_TC3_CC0 \
- ((uint32_t)(((double)CONF_TC3_WAVE_PER_VAL * CONF_GCLK_TC3_FREQUENCY) / 1000000 / (1 << CONF_TC3_PRESCALER) - 1))
-#define CONF_TC3_CC1 ((CONF_TC3_CC0 * CONF_TC3_WAVE_DUTY_VAL) / 1000)
-
-#elif CONF_TC3_PRESCALER == TC_CTRLA_PRESCALER_DIV64_Val
-#define CONF_TC3_CC0 ((uint32_t)(((double)CONF_TC3_WAVE_PER_VAL * CONF_GCLK_TC3_FREQUENCY) / 64000000 - 1))
-#define CONF_TC3_CC1 ((CONF_TC3_CC0 * CONF_TC3_WAVE_DUTY_VAL) / 1000)
-
-#elif CONF_TC3_PRESCALER == TC_CTRLA_PRESCALER_DIV256_Val
-#define CONF_TC3_CC0 ((uint32_t)(((double)CONF_TC3_WAVE_PER_VAL * CONF_GCLK_TC3_FREQUENCY) / 256000000 - 1))
-#define CONF_TC3_CC1 ((CONF_TC3_CC0 * CONF_TC3_WAVE_DUTY_VAL) / 1000)
-
-#elif CONF_TC3_PRESCALER == TC_CTRLA_PRESCALER_DIV1024_Val
-#define CONF_TC3_CC0 ((uint32_t)(((double)CONF_TC3_WAVE_PER_VAL * CONF_GCLK_TC3_FREQUENCY) / 1024000000 - 1))
-#define CONF_TC3_CC1 ((CONF_TC3_CC0 * CONF_TC3_WAVE_DUTY_VAL) / 1000)
-#endif
-
-//
-
-// Advanced settings
-// Mode
-// Counter in 16-bit mode
-// Counter in 32-bit mode
-// These bits mode
-// tc_mode
-#ifndef CONF_TC3_MODE
-#define CONF_TC3_MODE TC_CTRLA_MODE_COUNT16_Val
-#endif
-
-/* Unused in 16/32 bit PWM mode */
-#ifndef CONF_TC3_PER
-#define CONF_TC3_PER 0x32
-#endif
-
-// Prescaler and Counter Synchronization Selection
-// Reload or reset counter on next GCLK
-// Reload or reset counter on next prescaler clock
-// Reload or reset counter on next GCLK and reset prescaler counter
-// These bits select if on retrigger event, the Counter should be cleared or reloaded on the next GCLK_TCx clock or on the next prescaled GCLK_TCx clock.
-// tc_arch_presync
-#ifndef CONF_TC3_PRESCSYNC
-#define CONF_TC3_PRESCSYNC TC_CTRLA_PRESCSYNC_GCLK_Val
-#endif
-
-// Run in standby
-// Indicates whether the will continue running in standby sleep mode or not
-// tc_arch_runstdby
-#ifndef CONF_TC3_RUNSTDBY
-#define CONF_TC3_RUNSTDBY 0
-#endif
-
-// On-Demand
-// Indicates whether the TC3's on-demand mode is on or not
-// tc_arch_ondemand
-#ifndef CONF_TC3_ONDEMAND
-#define CONF_TC3_ONDEMAND 0
-#endif
-
-// Auto Lock
-// <0x0=>The Lock Update bit is not affected on overflow/underflow and re-trigger event
-// <0x1=>The Lock Update bit is set on each overflow/underflow or re-trigger event
-// tc_arch_alock
-#ifndef CONF_TC3_ALOCK
-#define CONF_TC3_ALOCK 0
-#endif
-
-/* Commented intentionally. Timer uses fixed value. May be used by other abstractions based on TC. */
-//#define CONF_TC3_CAPTEN0 0
-//#define CONF_TC3_CAPTEN1 0
-//#define CONF_TC3_COPEN0 0
-//#define CONF_TC3_COPEN1 0
-
-/* Commented intentionally. Timer uses fixed value. May be used by other abstractions based on TC. */
-//#define CONF_TC3_DIR 0
-//#define CONF_TC3_ONESHOT 0
-//#define CONF_TC3_LUPD 0
-
-// Debug Running Mode
-// Indicates whether the Debug Running Mode is enabled or not
-// tc_arch_dbgrun
-#ifndef CONF_TC3_DBGRUN
-#define CONF_TC3_DBGRUN 0
-#endif
-
-// Event control
-// timer_event_control
-#ifndef CONF_TC3_EVENT_CONTROL_ENABLE
-#define CONF_TC3_EVENT_CONTROL_ENABLE 0
-#endif
-
-// Output Event On Match or Capture on Channel 0
-// Enable output of event on timer tick
-// tc_arch_mceo0
-#ifndef CONF_TC3_MCEO0
-#define CONF_TC3_MCEO0 0
-#endif
-
-// Output Event On Match or Capture on Channel 1
-// Enable output of event on timer tick
-// tc_arch_mceo1
-#ifndef CONF_TC3_MCEO1
-#define CONF_TC3_MCEO1 0
-#endif
-
-// Output Event On Timer Tick
-// Enable output of event on timer tick
-// tc_arch_ovfeo
-#ifndef CONF_TC3_OVFEO
-#define CONF_TC3_OVFEO 0
-#endif
-
-// Event Input
-// Enable asynchronous input events
-// tc_arch_tcei
-#ifndef CONF_TC3_TCEI
-#define CONF_TC3_TCEI 0
-#endif
-
-// Inverted Event Input
-// Invert the asynchronous input events
-// tc_arch_tcinv
-#ifndef CONF_TC3_TCINV
-#define CONF_TC3_TCINV 0
-#endif
-
-// Event action
-// <0=> Event action disabled
-// <1=> Start, restart or re-trigger TC on event
-// <2=> Count on event
-// <3=> Start on event
-// <4=> Time stamp capture
-// <5=> Period captured in CC0, pulse width in CC1
-// <6=> Period captured in CC1, pulse width in CC0
-// <7=> Pulse width capture
-// Event which will be performed on an event
-// tc_arch_evact
-#ifndef CONF_TC3_EVACT
-#define CONF_TC3_EVACT 0
-#endif
-//
-
-/* Commented intentionally. Timer uses fixed value. May be used by other abstractions based on TC. */
-//#define CONF_TC3_WAVEGEN TC_CTRLA_WAVEGEN_MFRQ_Val
-
-/* Commented intentionally. Timer uses fixed value. May be used by other abstractions based on TC. */
-//#define CONF_TC3_INVEN0 0
-//#define CONF_TC3_INVEN1 0
-
-/* Commented intentionally. Timer uses fixed value. May be used by other abstractions based on TC. */
-//#define CONF_TC3_PERBUF 0
-
-/* Commented intentionally. Timer uses fixed value. May be used by other abstractions based on TC. */
-//#define CONF_TC3_CCBUF0 0
-//#define CONF_TC3_CCBUF1 0
-
-//
-
-// <<< end of configuration section >>>
-
-#endif // HPL_TC_CONFIG_H
diff --git a/Smol Watch Project/My Project/Debug/Makefile b/Smol Watch Project/My Project/Debug/Makefile
new file mode 100644
index 0000000..e85ec0b
--- /dev/null
+++ b/Smol Watch Project/My Project/Debug/Makefile
@@ -0,0 +1,628 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+SHELL := cmd.exe
+RM := rm -rf
+
+USER_OBJS :=
+
+LIBS :=
+PROJ :=
+
+O_SRCS :=
+C_SRCS :=
+S_SRCS :=
+S_UPPER_SRCS :=
+OBJ_SRCS :=
+ASM_SRCS :=
+PREPROCESSING_SRCS :=
+OBJS :=
+OBJS_AS_ARGS :=
+C_DEPS :=
+C_DEPS_AS_ARGS :=
+EXECUTABLES :=
+OUTPUT_FILE_PATH :=
+OUTPUT_FILE_PATH_AS_ARGS :=
+AVR_APP_PATH :=$$$AVR_APP_PATH$$$
+QUOTE := "
+ADDITIONAL_DEPENDENCIES:=
+OUTPUT_FILE_DEP:=
+LIB_DEP:=
+LINKER_SCRIPT_DEP:=
+
+# Every subdirectory with source files must be described here
+SUBDIRS := \
+../Config/ \
+../Device_Startup/ \
+../examples/ \
+../hal/ \
+../hal/documentation/ \
+../hal/include/ \
+../hal/src/ \
+../hal/utils/ \
+../hal/utils/include/ \
+../hal/utils/src/ \
+../hpl/ \
+../hpl/adc/ \
+../hpl/core/ \
+../hpl/dmac/ \
+../hpl/doc_lite/ \
+../hpl/eic/ \
+../hpl/gclk/ \
+../hpl/mclk/ \
+../hpl/osc32kctrl/ \
+../hpl/oscctrl/ \
+../hpl/pm/ \
+../hpl/port/ \
+../hpl/rtc/ \
+../hpl/sercom/ \
+../hpl/slcd/ \
+../hpl/systick/ \
+../hpl/tcc/ \
+../hpl/tc/ \
+../hri/ \
+../watch-library
+
+
+# Add inputs and outputs from these tool invocations to the build variables
+C_SRCS += \
+../atmel_start.c \
+../Device_Startup/startup_saml22.c \
+../Device_Startup/system_saml22.c \
+../driver_init.c \
+../examples/driver_examples.c \
+../hal/src/hal_adc_sync.c \
+../hal/src/hal_atomic.c \
+../hal/src/hal_calendar.c \
+../hal/src/hal_delay.c \
+../hal/src/hal_ext_irq.c \
+../hal/src/hal_gpio.c \
+../hal/src/hal_i2c_m_sync.c \
+../hal/src/hal_init.c \
+../hal/src/hal_io.c \
+../hal/src/hal_pwm.c \
+../hal/src/hal_slcd_sync.c \
+../hal/src/hal_sleep.c \
+../hal/utils/src/utils_assert.c \
+../hal/utils/src/utils_event.c \
+../hal/utils/src/utils_list.c \
+../hal/utils/src/utils_syscalls.c \
+../hpl/adc/hpl_adc.c \
+../hpl/core/hpl_core_m0plus_base.c \
+../hpl/core/hpl_init.c \
+../hpl/dmac/hpl_dmac.c \
+../hpl/eic/hpl_eic.c \
+../hpl/gclk/hpl_gclk.c \
+../hpl/mclk/hpl_mclk.c \
+../hpl/osc32kctrl/hpl_osc32kctrl.c \
+../hpl/oscctrl/hpl_oscctrl.c \
+../hpl/pm/hpl_pm.c \
+../hpl/rtc/hpl_rtc.c \
+../hpl/sercom/hpl_sercom.c \
+../hpl/slcd/hpl_slcd.c \
+../hpl/systick/hpl_systick.c \
+../hpl/tcc/hpl_tcc.c \
+../hpl/tc/tc_lite.c \
+../mars_clock.c \
+../main.c \
+../watch-library/watch.c
+
+
+PREPROCESSING_SRCS +=
+
+
+ASM_SRCS +=
+
+
+OBJS += \
+atmel_start.o \
+Device_Startup/startup_saml22.o \
+Device_Startup/system_saml22.o \
+driver_init.o \
+examples/driver_examples.o \
+hal/src/hal_adc_sync.o \
+hal/src/hal_atomic.o \
+hal/src/hal_calendar.o \
+hal/src/hal_delay.o \
+hal/src/hal_ext_irq.o \
+hal/src/hal_gpio.o \
+hal/src/hal_i2c_m_sync.o \
+hal/src/hal_init.o \
+hal/src/hal_io.o \
+hal/src/hal_pwm.o \
+hal/src/hal_slcd_sync.o \
+hal/src/hal_sleep.o \
+hal/utils/src/utils_assert.o \
+hal/utils/src/utils_event.o \
+hal/utils/src/utils_list.o \
+hal/utils/src/utils_syscalls.o \
+hpl/adc/hpl_adc.o \
+hpl/core/hpl_core_m0plus_base.o \
+hpl/core/hpl_init.o \
+hpl/dmac/hpl_dmac.o \
+hpl/eic/hpl_eic.o \
+hpl/gclk/hpl_gclk.o \
+hpl/mclk/hpl_mclk.o \
+hpl/osc32kctrl/hpl_osc32kctrl.o \
+hpl/oscctrl/hpl_oscctrl.o \
+hpl/pm/hpl_pm.o \
+hpl/rtc/hpl_rtc.o \
+hpl/sercom/hpl_sercom.o \
+hpl/slcd/hpl_slcd.o \
+hpl/systick/hpl_systick.o \
+hpl/tcc/hpl_tcc.o \
+hpl/tc/tc_lite.o \
+mars_clock.o \
+main.o \
+watch-library/watch.o
+
+OBJS_AS_ARGS += \
+atmel_start.o \
+Device_Startup/startup_saml22.o \
+Device_Startup/system_saml22.o \
+driver_init.o \
+examples/driver_examples.o \
+hal/src/hal_adc_sync.o \
+hal/src/hal_atomic.o \
+hal/src/hal_calendar.o \
+hal/src/hal_delay.o \
+hal/src/hal_ext_irq.o \
+hal/src/hal_gpio.o \
+hal/src/hal_i2c_m_sync.o \
+hal/src/hal_init.o \
+hal/src/hal_io.o \
+hal/src/hal_pwm.o \
+hal/src/hal_slcd_sync.o \
+hal/src/hal_sleep.o \
+hal/utils/src/utils_assert.o \
+hal/utils/src/utils_event.o \
+hal/utils/src/utils_list.o \
+hal/utils/src/utils_syscalls.o \
+hpl/adc/hpl_adc.o \
+hpl/core/hpl_core_m0plus_base.o \
+hpl/core/hpl_init.o \
+hpl/dmac/hpl_dmac.o \
+hpl/eic/hpl_eic.o \
+hpl/gclk/hpl_gclk.o \
+hpl/mclk/hpl_mclk.o \
+hpl/osc32kctrl/hpl_osc32kctrl.o \
+hpl/oscctrl/hpl_oscctrl.o \
+hpl/pm/hpl_pm.o \
+hpl/rtc/hpl_rtc.o \
+hpl/sercom/hpl_sercom.o \
+hpl/slcd/hpl_slcd.o \
+hpl/systick/hpl_systick.o \
+hpl/tcc/hpl_tcc.o \
+hpl/tc/tc_lite.o \
+mars_clock.o \
+main.o \
+watch-library/watch.o
+
+C_DEPS += \
+atmel_start.d \
+Device_Startup/startup_saml22.d \
+Device_Startup/system_saml22.d \
+driver_init.d \
+examples/driver_examples.d \
+hal/src/hal_adc_sync.d \
+hal/src/hal_atomic.d \
+hal/src/hal_calendar.d \
+hal/src/hal_delay.d \
+hal/src/hal_ext_irq.d \
+hal/src/hal_gpio.d \
+hal/src/hal_i2c_m_sync.d \
+hal/src/hal_init.d \
+hal/src/hal_io.d \
+hal/src/hal_pwm.d \
+hal/src/hal_slcd_sync.d \
+hal/src/hal_sleep.d \
+hal/utils/src/utils_assert.d \
+hal/utils/src/utils_event.d \
+hal/utils/src/utils_list.d \
+hal/utils/src/utils_syscalls.d \
+hpl/adc/hpl_adc.d \
+hpl/core/hpl_core_m0plus_base.d \
+hpl/core/hpl_init.d \
+hpl/dmac/hpl_dmac.d \
+hpl/eic/hpl_eic.d \
+hpl/gclk/hpl_gclk.d \
+hpl/mclk/hpl_mclk.d \
+hpl/osc32kctrl/hpl_osc32kctrl.d \
+hpl/oscctrl/hpl_oscctrl.d \
+hpl/pm/hpl_pm.d \
+hpl/rtc/hpl_rtc.d \
+hpl/sercom/hpl_sercom.d \
+hpl/slcd/hpl_slcd.d \
+hpl/systick/hpl_systick.d \
+hpl/tcc/hpl_tcc.d \
+hpl/tc/tc_lite.d \
+mars_clock.d \
+main.d \
+watch-library/watch.d
+
+C_DEPS_AS_ARGS += \
+atmel_start.d \
+Device_Startup/startup_saml22.d \
+Device_Startup/system_saml22.d \
+driver_init.d \
+examples/driver_examples.d \
+hal/src/hal_adc_sync.d \
+hal/src/hal_atomic.d \
+hal/src/hal_calendar.d \
+hal/src/hal_delay.d \
+hal/src/hal_ext_irq.d \
+hal/src/hal_gpio.d \
+hal/src/hal_i2c_m_sync.d \
+hal/src/hal_init.d \
+hal/src/hal_io.d \
+hal/src/hal_pwm.d \
+hal/src/hal_slcd_sync.d \
+hal/src/hal_sleep.d \
+hal/utils/src/utils_assert.d \
+hal/utils/src/utils_event.d \
+hal/utils/src/utils_list.d \
+hal/utils/src/utils_syscalls.d \
+hpl/adc/hpl_adc.d \
+hpl/core/hpl_core_m0plus_base.d \
+hpl/core/hpl_init.d \
+hpl/dmac/hpl_dmac.d \
+hpl/eic/hpl_eic.d \
+hpl/gclk/hpl_gclk.d \
+hpl/mclk/hpl_mclk.d \
+hpl/osc32kctrl/hpl_osc32kctrl.d \
+hpl/oscctrl/hpl_oscctrl.d \
+hpl/pm/hpl_pm.d \
+hpl/rtc/hpl_rtc.d \
+hpl/sercom/hpl_sercom.d \
+hpl/slcd/hpl_slcd.d \
+hpl/systick/hpl_systick.d \
+hpl/tcc/hpl_tcc.d \
+hpl/tc/tc_lite.d \
+mars_clock.d \
+main.d \
+watch-library/watch.d
+
+OUTPUT_FILE_PATH +=My\ Project.elf
+
+OUTPUT_FILE_PATH_AS_ARGS +="My Project.elf"
+
+ADDITIONAL_DEPENDENCIES:=
+
+OUTPUT_FILE_DEP:= ./makedep.mk
+
+LIB_DEP+=
+
+LINKER_SCRIPT_DEP+= \
+../Device_Startup/saml22j18a_flash.ld \
+../Device_Startup/saml22j18a_sram.ld
+
+
+# AVR32/GNU C Compiler
+./atmel_start.o: .././atmel_start.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+Device_Startup/startup_saml22.o: ../Device_Startup/startup_saml22.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+Device_Startup/system_saml22.o: ../Device_Startup/system_saml22.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+./driver_init.o: .././driver_init.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+examples/driver_examples.o: ../examples/driver_examples.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/src/hal_adc_sync.o: ../hal/src/hal_adc_sync.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/src/hal_atomic.o: ../hal/src/hal_atomic.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/src/hal_calendar.o: ../hal/src/hal_calendar.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/src/hal_delay.o: ../hal/src/hal_delay.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/src/hal_ext_irq.o: ../hal/src/hal_ext_irq.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/src/hal_gpio.o: ../hal/src/hal_gpio.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/src/hal_i2c_m_sync.o: ../hal/src/hal_i2c_m_sync.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/src/hal_init.o: ../hal/src/hal_init.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/src/hal_io.o: ../hal/src/hal_io.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/src/hal_pwm.o: ../hal/src/hal_pwm.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/src/hal_slcd_sync.o: ../hal/src/hal_slcd_sync.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/src/hal_sleep.o: ../hal/src/hal_sleep.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/utils/src/utils_assert.o: ../hal/utils/src/utils_assert.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/utils/src/utils_event.o: ../hal/utils/src/utils_event.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/utils/src/utils_list.o: ../hal/utils/src/utils_list.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hal/utils/src/utils_syscalls.o: ../hal/utils/src/utils_syscalls.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/adc/hpl_adc.o: ../hpl/adc/hpl_adc.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/core/hpl_core_m0plus_base.o: ../hpl/core/hpl_core_m0plus_base.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/core/hpl_init.o: ../hpl/core/hpl_init.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/dmac/hpl_dmac.o: ../hpl/dmac/hpl_dmac.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/eic/hpl_eic.o: ../hpl/eic/hpl_eic.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/gclk/hpl_gclk.o: ../hpl/gclk/hpl_gclk.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/mclk/hpl_mclk.o: ../hpl/mclk/hpl_mclk.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/osc32kctrl/hpl_osc32kctrl.o: ../hpl/osc32kctrl/hpl_osc32kctrl.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/oscctrl/hpl_oscctrl.o: ../hpl/oscctrl/hpl_oscctrl.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/pm/hpl_pm.o: ../hpl/pm/hpl_pm.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/rtc/hpl_rtc.o: ../hpl/rtc/hpl_rtc.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/sercom/hpl_sercom.o: ../hpl/sercom/hpl_sercom.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/slcd/hpl_slcd.o: ../hpl/slcd/hpl_slcd.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/systick/hpl_systick.o: ../hpl/systick/hpl_systick.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/tcc/hpl_tcc.o: ../hpl/tcc/hpl_tcc.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+hpl/tc/tc_lite.o: ../hpl/tc/tc_lite.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+./mars_clock.o: .././mars_clock.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+./main.o: .././main.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+watch-library/watch.o: ../watch-library/watch.c
+ @echo Building file: $<
+ @echo Invoking: ARM/GNU C Compiler : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAML22J18A__ -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"../Config" -I".." -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/adc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/eic" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/rtc" -I"../hpl/sercom" -I"../hpl/slcd" -I"../hpl/systick" -I"../hpl/tc" -I"../hpl/tcc" -I"../hri" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAML22_DFP\1.2.77\include" -Og -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
+ @echo Finished building: $<
+
+
+
+
+
+# AVR32/GNU Preprocessing Assembler
+
+
+
+# AVR32/GNU Assembler
+
+
+
+
+ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(strip $(C_DEPS)),)
+-include $(C_DEPS)
+endif
+endif
+
+# Add inputs and outputs from these tool invocations to the build variables
+
+# All Target
+all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES)
+
+$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) $(LINKER_SCRIPT_DEP)
+ @echo Building target: $@
+ @echo Invoking: ARM/GNU Linker : 6.3.1
+ $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -mthumb -Wl,-Map="My Project.map" --specs=nano.specs -Wl,--start-group -lm -Wl,--end-group -L"..\\Device_Startup" -Wl,--gc-sections -mcpu=cortex-m0plus -Tsaml22j18a_flash.ld
+ @echo Finished building target: $@
+ "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-objcopy.exe" -O binary "My Project.elf" "My Project.bin"
+ "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature "My Project.elf" "My Project.hex"
+ "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O binary "My Project.elf" "My Project.eep" || exit 0
+ "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-objdump.exe" -h -S "My Project.elf" > "My Project.lss"
+ "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature "My Project.elf" "My Project.srec"
+ "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-size.exe" "My Project.elf"
+
+
+
+
+
+
+
+# Other Targets
+clean:
+ -$(RM) $(OBJS_AS_ARGS) $(EXECUTABLES)
+ -$(RM) $(C_DEPS_AS_ARGS)
+ rm -rf "My Project.elf" "My Project.a" "My Project.hex" "My Project.bin" "My Project.lss" "My Project.eep" "My Project.map" "My Project.srec"
+
\ No newline at end of file
diff --git a/Smol Watch Project/My Project/Debug/My Project.eep b/Smol Watch Project/My Project/Debug/My Project.eep
new file mode 100644
index 0000000..e69de29
diff --git a/Smol Watch Project/My Project/Debug/makedep.mk b/Smol Watch Project/My Project/Debug/makedep.mk
new file mode 100644
index 0000000..20000cb
--- /dev/null
+++ b/Smol Watch Project/My Project/Debug/makedep.mk
@@ -0,0 +1,84 @@
+################################################################################
+# Automatically-generated file. Do not edit or delete the file
+################################################################################
+
+atmel_start.c
+
+Device_Startup\startup_saml22.c
+
+Device_Startup\system_saml22.c
+
+driver_init.c
+
+examples\driver_examples.c
+
+hal\src\hal_adc_sync.c
+
+hal\src\hal_atomic.c
+
+hal\src\hal_calendar.c
+
+hal\src\hal_delay.c
+
+hal\src\hal_ext_irq.c
+
+hal\src\hal_gpio.c
+
+hal\src\hal_i2c_m_sync.c
+
+hal\src\hal_init.c
+
+hal\src\hal_io.c
+
+hal\src\hal_pwm.c
+
+hal\src\hal_slcd_sync.c
+
+hal\src\hal_sleep.c
+
+hal\utils\src\utils_assert.c
+
+hal\utils\src\utils_event.c
+
+hal\utils\src\utils_list.c
+
+hal\utils\src\utils_syscalls.c
+
+hpl\adc\hpl_adc.c
+
+hpl\core\hpl_core_m0plus_base.c
+
+hpl\core\hpl_init.c
+
+hpl\dmac\hpl_dmac.c
+
+hpl\eic\hpl_eic.c
+
+hpl\gclk\hpl_gclk.c
+
+hpl\mclk\hpl_mclk.c
+
+hpl\osc32kctrl\hpl_osc32kctrl.c
+
+hpl\oscctrl\hpl_oscctrl.c
+
+hpl\pm\hpl_pm.c
+
+hpl\rtc\hpl_rtc.c
+
+hpl\sercom\hpl_sercom.c
+
+hpl\slcd\hpl_slcd.c
+
+hpl\systick\hpl_systick.c
+
+hpl\tcc\hpl_tcc.c
+
+hpl\tc\tc_lite.c
+
+mars_clock.c
+
+main.c
+
+watch-library\watch.c
+
diff --git a/Smol Watch Project/My Project/My Project.cproj b/Smol Watch Project/My Project/My Project.cproj
index dbb0503..ae435df 100644
--- a/Smol Watch Project/My Project/My Project.cproj
+++ b/Smol Watch Project/My Project/My Project.cproj
@@ -139,18 +139,18 @@
-
-
+
+
-
-
+
+
-
+
-
+
@@ -163,7 +163,7 @@
-
+
@@ -186,10 +186,10 @@
-
-
-
-
+
+
+
+
@@ -204,7 +204,6 @@
-
@@ -537,9 +536,6 @@
compile
-
- compile
-
compile
@@ -861,10 +857,10 @@
compile
-
+
compile
-
+
compile
@@ -994,6 +990,7 @@
+
@@ -1035,6 +1032,9 @@
compile
+
+ compile
+
\ No newline at end of file
diff --git a/Smol Watch Project/My Project/driver_init.c b/Smol Watch Project/My Project/driver_init.c
index c4223eb..3490a06 100644
--- a/Smol Watch Project/My Project/driver_init.c
+++ b/Smol Watch Project/My Project/driver_init.c
@@ -21,8 +21,6 @@ struct calendar_descriptor CALENDAR_0;
struct i2c_m_sync_desc I2C_0;
-struct pwm_descriptor PWM_0;
-
struct pwm_descriptor PWM_1;
void ADC_0_PORT_init(void)
@@ -169,14 +167,8 @@ void PWM_0_PORT_init(void)
void PWM_0_CLOCK_init(void)
{
hri_mclk_set_APBCMASK_TC3_bit(MCLK);
- hri_gclk_write_PCHCTRL_reg(GCLK, TC3_GCLK_ID, CONF_GCLK_TC3_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos));
-}
-void PWM_0_init(void)
-{
- PWM_0_CLOCK_init();
- PWM_0_PORT_init();
- pwm_init(&PWM_0, TC3, _tc_get_pwm());
+ hri_gclk_write_PCHCTRL_reg(GCLK, TC3_GCLK_ID, CONF_GCLK_TC3_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos));
}
void PWM_1_PORT_init(void)
@@ -324,6 +316,10 @@ void system_init(void)
delay_driver_init();
+ PWM_0_CLOCK_init();
+
+ PWM_0_PORT_init();
+
PWM_0_init();
PWM_1_init();
diff --git a/Smol Watch Project/My Project/driver_init.h b/Smol Watch Project/My Project/driver_init.h
index 107b156..66ff8aa 100644
--- a/Smol Watch Project/My Project/driver_init.h
+++ b/Smol Watch Project/My Project/driver_init.h
@@ -30,8 +30,7 @@ extern "C" {
#include
#include
-#include
-#include
+#include
#include
#include
@@ -43,8 +42,6 @@ extern struct calendar_descriptor CALENDAR_0;
extern struct i2c_m_sync_desc I2C_0;
-extern struct pwm_descriptor PWM_0;
-
extern struct pwm_descriptor PWM_1;
extern struct slcd_sync_descriptor SEGMENT_LCD_0;
@@ -61,9 +58,11 @@ void I2C_0_PORT_init(void);
void delay_driver_init(void);
-void PWM_0_PORT_init(void);
void PWM_0_CLOCK_init(void);
-void PWM_0_init(void);
+
+void PWM_0_PORT_init(void);
+
+int8_t PWM_0_init(void);
void PWM_1_PORT_init(void);
void PWM_1_CLOCK_init(void);
@@ -71,7 +70,7 @@ void PWM_1_init(void);
void EXTERNAL_IRQ_0_init(void);
-void SEGMENT_LCD_0_init(void);
+void SEGMENT_LCD_0_init(void);
/**
* \brief Perform system initialization, initialize pins and clocks for
diff --git a/Smol Watch Project/My Project/examples/driver_examples.c b/Smol Watch Project/My Project/examples/driver_examples.c
index 1932700..d99242d 100644
--- a/Smol Watch Project/My Project/examples/driver_examples.c
+++ b/Smol Watch Project/My Project/examples/driver_examples.c
@@ -97,15 +97,6 @@ void delay_example(void)
delay_ms(5000);
}
-/**
- * Example of using PWM_0.
- */
-void PWM_0_example(void)
-{
- pwm_set_parameters(&PWM_0, 10000, 5000);
- pwm_enable(&PWM_0);
-}
-
/**
* Example of using PWM_1.
*/
diff --git a/Smol Watch Project/My Project/examples/driver_examples.h b/Smol Watch Project/My Project/examples/driver_examples.h
index 4295ca9..98e4c9d 100644
--- a/Smol Watch Project/My Project/examples/driver_examples.h
+++ b/Smol Watch Project/My Project/examples/driver_examples.h
@@ -22,8 +22,6 @@ void I2C_0_example(void);
void delay_example(void);
-void PWM_0_example(void);
-
void PWM_1_example(void);
void SEGMENT_LCD_0_example(void);
diff --git a/Smol Watch Project/My Project/hal/include/hal_pwm.h b/Smol Watch Project/My Project/hal/include/hal_pwm.h
index d55f7e6..c8ed842 100644
--- a/Smol Watch Project/My Project/hal/include/hal_pwm.h
+++ b/Smol Watch Project/My Project/hal/include/hal_pwm.h
@@ -78,8 +78,6 @@ struct pwm_descriptor {
struct _pwm_device device;
/** PWM callback structure */
struct pwm_callbacks pwm_cb;
- /** PWM HPL interface pointer */
- struct _pwm_hpl_interface *func;
};
/** \brief Initialize the PWM HAL instance and hardware
diff --git a/Smol Watch Project/My Project/hal/include/hpl_pwm.h b/Smol Watch Project/My Project/hal/include/hpl_pwm.h
index ea056de..ff87052 100644
--- a/Smol Watch Project/My Project/hal/include/hpl_pwm.h
+++ b/Smol Watch Project/My Project/hal/include/hpl_pwm.h
@@ -97,6 +97,94 @@ struct _pwm_hpl_interface {
uint32_t (*pwm_get_duty)(const struct _pwm_device *const device);
void (*set_irq_state)(struct _pwm_device *const device, const enum _pwm_callback_type type, const bool disable);
};
+/**
+ * \brief Initialize TC
+ *
+ * This function does low level TC configuration.
+ *
+ * \param[in] device The pointer to PWM device instance
+ * \param[in] hw The pointer to hardware instance
+ *
+ * \return Initialization status.
+ */
+int32_t _pwm_init(struct _pwm_device *const device, void *const hw);
+
+/**
+ * \brief Deinitialize TC
+ *
+ * \param[in] device The pointer to PWM device instance
+ */
+void _pwm_deinit(struct _pwm_device *const device);
+
+/**
+ * \brief Retrieve offset of the given tc hardware instance
+ *
+ * \param[in] device The pointer to PWM device instance
+ *
+ * \return The offset of the given tc hardware instance
+ */
+uint8_t _pwm_get_hardware_offset(const struct _pwm_device *const device);
+
+/**
+ * \brief Start hardware pwm
+ *
+ * \param[in] device The pointer to PWM device instance
+ */
+void _pwm_enable(struct _pwm_device *const device);
+
+/**
+ * \brief Stop hardware pwm
+ *
+ * \param[in] device The pointer to PWM device instance
+ */
+void _pwm_disable(struct _pwm_device *const device);
+
+/**
+ * \brief Set pwm parameter
+ *
+ * \param[in] device The pointer to PWM device instance
+ * \param[in] period Total period of one PWM cycle.
+ * \param[in] duty_cycle Period of PWM first half during one cycle.
+ */
+void _pwm_set_param(struct _pwm_device *const device, const pwm_period_t period, const pwm_period_t duty_cycle);
+
+/**
+ * \brief Check if pwm is working
+ *
+ * \param[in] device The pointer to PWM device instance
+ *
+ * \return Check status.
+ * \retval true The given pwm is working
+ * \retval false The given pwm is not working
+ */
+bool _pwm_is_enabled(const struct _pwm_device *const device);
+
+/**
+ * \brief Get pwm waveform period value
+ *
+ * \param[in] device The pointer to PWM device instance
+ *
+ * \return Period value.
+ */
+pwm_period_t _pwm_get_period(const struct _pwm_device *const device);
+
+/**
+ * \brief Get pwm waveform duty cycle value
+ *
+ * \param[in] device The pointer to PWM device instance
+ *
+ * \return Duty cycle value
+ */
+uint32_t _pwm_get_duty(const struct _pwm_device *const device);
+
+/**
+ * \brief Enable/disable PWM interrupt
+ *
+ * param[in] device The pointer to PWM device instance
+ * param[in] type The type of interrupt to disable/enable if applicable
+ * param[in] disable Enable or disable
+ */
+void _pwm_set_irq_state(struct _pwm_device *const device, const enum _pwm_callback_type type, const bool disable);
#ifdef __cplusplus
}
diff --git a/Smol Watch Project/My Project/hal/src/hal_pwm.c b/Smol Watch Project/My Project/hal/src/hal_pwm.c
index bc0629f..b586972 100644
--- a/Smol Watch Project/My Project/hal/src/hal_pwm.c
+++ b/Smol Watch Project/My Project/hal/src/hal_pwm.c
@@ -48,9 +48,8 @@ static void pwm_detect_fault(struct _pwm_device *device);
*/
int32_t pwm_init(struct pwm_descriptor *const descr, void *const hw, struct _pwm_hpl_interface *const func)
{
- ASSERT(descr && hw && func);
- descr->func = func;
- descr->func->init(&descr->device, hw);
+ ASSERT(descr && hw);
+ _pwm_init(&descr->device, hw);
descr->device.callback.pwm_period_cb = pwm_period_expired;
descr->device.callback.pwm_error_cb = pwm_detect_fault;
return ERR_NONE;
@@ -61,8 +60,8 @@ int32_t pwm_init(struct pwm_descriptor *const descr, void *const hw, struct _pwm
*/
int32_t pwm_deinit(struct pwm_descriptor *const descr)
{
- ASSERT(descr && descr->func);
- descr->func->deinit(&descr->device);
+ ASSERT(descr);
+ _pwm_deinit(&descr->device);
return ERR_NONE;
}
@@ -72,11 +71,11 @@ int32_t pwm_deinit(struct pwm_descriptor *const descr)
*/
int32_t pwm_enable(struct pwm_descriptor *const descr)
{
- ASSERT(descr && descr->func);
- if (descr->func->is_pwm_enabled(&descr->device)) {
+ ASSERT(descr);
+ if (_pwm_is_enabled(&descr->device)) {
return ERR_DENIED;
}
- descr->func->start_pwm(&descr->device);
+ _pwm_enable(&descr->device);
return ERR_NONE;
}
@@ -86,11 +85,11 @@ int32_t pwm_enable(struct pwm_descriptor *const descr)
*/
int32_t pwm_disable(struct pwm_descriptor *const descr)
{
- ASSERT(descr && descr->func);
- if (!descr->func->is_pwm_enabled(&descr->device)) {
+ ASSERT(descr);
+ if (!_pwm_is_enabled(&descr->device)) {
return ERR_DENIED;
}
- descr->func->stop_pwm(&descr->device);
+ _pwm_disable(&descr->device);
return ERR_NONE;
}
@@ -112,8 +111,8 @@ int32_t pwm_register_callback(struct pwm_descriptor *const descr, enum pwm_callb
default:
return ERR_INVALID_ARG;
}
- ASSERT(descr && descr->func);
- descr->func->set_irq_state(&descr->device, (enum _pwm_callback_type)type, NULL != cb);
+ ASSERT(descr);
+ _pwm_set_irq_state(&descr->device, (enum _pwm_callback_type)type, NULL != cb);
return ERR_NONE;
}
@@ -122,8 +121,8 @@ int32_t pwm_register_callback(struct pwm_descriptor *const descr, enum pwm_callb
*/
int32_t pwm_set_parameters(struct pwm_descriptor *const descr, const pwm_period_t period, const pwm_period_t duty_cycle)
{
- ASSERT(descr && descr->func);
- descr->func->set_pwm_param(&descr->device, period, duty_cycle);
+ ASSERT(descr);
+ _pwm_set_param(&descr->device, period, duty_cycle);
return ERR_NONE;
}
diff --git a/Smol Watch Project/My Project/hpl/doc_lite/tc.rst b/Smol Watch Project/My Project/hpl/doc_lite/tc.rst
new file mode 100644
index 0000000..833bb67
--- /dev/null
+++ b/Smol Watch Project/My Project/hpl/doc_lite/tc.rst
@@ -0,0 +1,39 @@
+=========
+TC driver
+=========
+The TC consists of a counter, a prescaler, compare/capture channels and control logic. The counter can be set to count events, or it can be configured to count clock pulses. The counter, together with the compare/capture channels, can be configured to timestamp input events, allowing capture of frequency and pulse width. It can also perform waveform generation, such as frequency generation and pulse-width modulation (PWM)
+
+The timer/counter is clocked by the peripheral clock with optional prescaling or from the event system.
+
+Features
+--------
+* Initialization
+
+Applications
+------------
+* Frequency Generation
+* Single-slope PWM (pulse width modulation)
+* Dual-slope PWM
+* Count on event
+* Quadrature decoding
+
+Dependencies
+------------
+* CLK for clock
+* CPUINT/PMIC for Interrupt
+* EVSYS for events
+* UPDI/PDI/JTAG for debug
+* PORT for Waveform Generation
+
+Concurrency
+-----------
+N/A
+
+Limitations
+-----------
+N/A
+
+Knows issues and workarounds
+----------------------------
+N/A
+
diff --git a/Smol Watch Project/My Project/hpl/tc/hpl_tc.c b/Smol Watch Project/My Project/hpl/tc/hpl_tc.c
deleted file mode 100644
index 38fa893..0000000
--- a/Smol Watch Project/My Project/hpl/tc/hpl_tc.c
+++ /dev/null
@@ -1,374 +0,0 @@
-
-/**
- * \file
- *
- * \brief SAM TC
- *
- * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
- *
- * \asf_license_start
- *
- * \page License
- *
- * Subject to your compliance with these terms, you may use Microchip
- * software and any derivatives exclusively with Microchip products.
- * It is your responsibility to comply with third party license terms applicable
- * to your use of third party software (including open source software) that
- * may accompany Microchip software.
- *
- * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
- * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
- * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
- * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
- * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
- * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
- * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
- * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
- * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
- * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
- * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
- *
- * \asf_license_stop
- *
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-#ifndef CONF_TC0_ENABLE
-#define CONF_TC0_ENABLE 0
-#endif
-#ifndef CONF_TC1_ENABLE
-#define CONF_TC1_ENABLE 0
-#endif
-#ifndef CONF_TC2_ENABLE
-#define CONF_TC2_ENABLE 0
-#endif
-#ifndef CONF_TC3_ENABLE
-#define CONF_TC3_ENABLE 0
-#endif
-#ifndef CONF_TC4_ENABLE
-#define CONF_TC4_ENABLE 0
-#endif
-#ifndef CONF_TC5_ENABLE
-#define CONF_TC5_ENABLE 0
-#endif
-#ifndef CONF_TC6_ENABLE
-#define CONF_TC6_ENABLE 0
-#endif
-#ifndef CONF_TC7_ENABLE
-#define CONF_TC7_ENABLE 0
-#endif
-
-/**
- * \brief Macro is used to fill usart configuration structure based on its
- * number
- *
- * \param[in] n The number of structures
- */
-#define TC_CONFIGURATION(n) \
- { \
- n, TC##n##_IRQn, \
- TC_CTRLA_MODE(CONF_TC##n##_MODE) | TC_CTRLA_PRESCSYNC(CONF_TC##n##_PRESCSYNC) \
- | (CONF_TC##n##_RUNSTDBY << TC_CTRLA_RUNSTDBY_Pos) | (CONF_TC##n##_ONDEMAND << TC_CTRLA_ONDEMAND_Pos) \
- | TC_CTRLA_PRESCALER(CONF_TC##n##_PRESCALER) | (CONF_TC##n##_ALOCK << TC_CTRLA_ALOCK_Pos), \
- (CONF_TC##n##_OVFEO << TC_EVCTRL_OVFEO_Pos) | (CONF_TC##n##_TCEI << TC_EVCTRL_TCEI_Pos) \
- | (CONF_TC##n##_TCINV << TC_EVCTRL_TCINV_Pos) | (CONF_TC##n##_EVACT << TC_EVCTRL_EVACT_Pos) \
- | (CONF_TC##n##_MCEO0 << TC_EVCTRL_MCEO0_Pos) | (CONF_TC##n##_MCEO1 << TC_EVCTRL_MCEO1_Pos), \
- (CONF_TC##n##_DBGRUN << TC_DBGCTRL_DBGRUN_Pos), CONF_TC##n##_PER, CONF_TC##n##_CC0, CONF_TC##n##_CC1, \
- }
-/**
- * \brief TC configuration type
- */
-struct tc_configuration {
- uint8_t number;
- IRQn_Type irq;
- hri_tc_ctrla_reg_t ctrl_a;
- hri_tc_evctrl_reg_t event_ctrl;
- hri_tc_dbgctrl_reg_t dbg_ctrl;
- hri_tccount8_per_reg_t per;
- hri_tccount32_cc_reg_t cc0;
- hri_tccount32_cc_reg_t cc1;
-};
-
-/**
- * \brief Array of TC configurations
- */
-static struct tc_configuration _tcs[] = {
-#if CONF_TC0_ENABLE == 1
- TC_CONFIGURATION(0),
-#endif
-#if CONF_TC1_ENABLE == 1
- TC_CONFIGURATION(1),
-#endif
-#if CONF_TC2_ENABLE == 1
- TC_CONFIGURATION(2),
-#endif
-#if CONF_TC3_ENABLE == 1
- TC_CONFIGURATION(3),
-#endif
-#if CONF_TC4_ENABLE == 1
- TC_CONFIGURATION(4),
-#endif
-#if CONF_TC5_ENABLE == 1
- TC_CONFIGURATION(5),
-#endif
-#if CONF_TC6_ENABLE == 1
- TC_CONFIGURATION(6),
-#endif
-#if CONF_TC7_ENABLE == 1
- TC_CONFIGURATION(7),
-#endif
-};
-/**
- * \brief Set of pointer to hal_pwm helper functions
- */
-static struct _pwm_hpl_interface _tc_pwm_functions = {
- _tc_pwm_init,
- _tc_pwm_deinit,
- _tc_start_pwm,
- _tc_stop_pwm,
- _tc_set_pwm_param,
- _tc_is_pwm_enabled,
- _tc_pwm_get_period,
- _tc_pwm_get_duty,
- _tc_pwm_set_irq_state,
-};
-
-static struct _pwm_device *_tc3_dev = NULL;
-
-static int8_t get_tc_index(const void *const hw);
-static void _tc_init_irq_param(const void *const hw, void *dev);
-static inline uint8_t _get_hardware_offset(const void *const hw);
-/**
- * \brief Initialize TC for PWM mode
- */
-int32_t _tc_pwm_init(struct _pwm_device *const device, void *const hw)
-{
- int8_t i = get_tc_index(hw);
- device->hw = hw;
-
- if (!hri_tc_is_syncing(hw, TC_SYNCBUSY_SWRST)) {
- if (hri_tc_get_CTRLA_reg(hw, TC_CTRLA_ENABLE)) {
- hri_tc_clear_CTRLA_ENABLE_bit(hw);
- hri_tc_wait_for_sync(hw, TC_SYNCBUSY_ENABLE);
- }
- hri_tc_write_CTRLA_reg(hw, TC_CTRLA_SWRST);
- }
- hri_tc_wait_for_sync(hw, TC_SYNCBUSY_SWRST);
-
- hri_tc_write_CTRLA_reg(hw, _tcs[i].ctrl_a);
- hri_tc_write_DBGCTRL_reg(hw, _tcs[i].dbg_ctrl);
- hri_tc_write_EVCTRL_reg(hw, _tcs[i].event_ctrl);
- hri_tc_write_WAVE_reg(hw, TC_WAVE_WAVEGEN_MPWM_Val);
-
- if ((_tcs[i].ctrl_a & TC_CTRLA_MODE_Msk) == TC_CTRLA_MODE_COUNT32) {
- hri_tccount32_write_CC_reg(hw, 0, _tcs[i].cc0);
- hri_tccount32_write_CC_reg(hw, 1, _tcs[i].cc1);
- } else if ((_tcs[i].ctrl_a & TC_CTRLA_MODE_Msk) == TC_CTRLA_MODE_COUNT16) {
- hri_tccount16_write_CC_reg(hw, 0, (uint16_t)_tcs[i].cc0);
- hri_tccount16_write_CC_reg(hw, 1, (uint16_t)_tcs[i].cc1);
- } else {
- /* 8-bit resolution is not accepted by duty cycle control */
- return -1;
- }
-
- _tc_init_irq_param(hw, (void *)device);
- NVIC_DisableIRQ(_tcs[i].irq);
- NVIC_ClearPendingIRQ(_tcs[i].irq);
- NVIC_EnableIRQ(_tcs[i].irq);
-
- return 0;
-}
-/**
- * \brief De-initialize TC for PWM mode
- */
-void _tc_pwm_deinit(struct _pwm_device *const device)
-{
- void *const hw = device->hw;
- int8_t i = get_tc_index(hw);
- ASSERT(ARRAY_SIZE(_tcs));
-
- NVIC_DisableIRQ(_tcs[i].irq);
-
- hri_tc_clear_CTRLA_ENABLE_bit(hw);
- hri_tc_set_CTRLA_SWRST_bit(hw);
-}
-/**
- * \brief Start PWM
- */
-void _tc_start_pwm(struct _pwm_device *const device)
-{
- hri_tc_set_CTRLA_ENABLE_bit(device->hw);
-}
-/**
- * \brief Stop PWM
- */
-void _tc_stop_pwm(struct _pwm_device *const device)
-{
- hri_tc_clear_CTRLA_ENABLE_bit(device->hw);
-}
-/**
- * \brief Set PWM parameter
- */
-void _tc_set_pwm_param(struct _pwm_device *const device, const pwm_period_t period, const pwm_period_t duty_cycle)
-{
- void *const hw = device->hw;
- int8_t i = get_tc_index(hw);
-
- _tcs[i].cc0 = period;
- _tcs[i].cc1 = duty_cycle;
- if ((_tcs[i].ctrl_a & TC_CTRLA_MODE_Msk) == TC_CTRLA_MODE_COUNT32) {
- hri_tccount32_write_CC_reg(hw, 0, _tcs[i].cc0);
- hri_tccount32_write_CC_reg(hw, 1, _tcs[i].cc1);
- } else {
- hri_tccount16_write_CC_reg(hw, 0, _tcs[i].cc0);
- hri_tccount16_write_CC_reg(hw, 1, _tcs[i].cc1);
- }
-}
-/**
- * \brief Get pwm waveform period value
- */
-pwm_period_t _tc_pwm_get_period(const struct _pwm_device *const device)
-{
- void *const hw = device->hw;
- int8_t i = get_tc_index(hw);
-
- if ((_tcs[i].ctrl_a & TC_CTRLA_MODE_Msk) == TC_CTRLA_MODE_COUNT32) {
- return (pwm_period_t)(hri_tccount32_read_CC_reg(hw, 0));
- } else {
- return (pwm_period_t)(hri_tccount16_read_CC_reg(hw, 0));
- }
-}
-/**
- * \brief Get pwm waveform duty cycle
- */
-uint32_t _tc_pwm_get_duty(const struct _pwm_device *const device)
-{
- void *const hw = device->hw;
- int8_t i = get_tc_index(hw);
- uint32_t per;
- uint32_t duty_cycle;
-
- if ((_tcs[i].ctrl_a & TC_CTRLA_MODE_Msk) == TC_CTRLA_MODE_COUNT32) {
- per = hri_tccount32_read_CC_reg(hw, 0);
- duty_cycle = hri_tccount32_read_CC_reg(hw, 1);
- } else {
- per = hri_tccount16_read_CC_reg(hw, 0);
- duty_cycle = hri_tccount16_read_CC_reg(hw, 1);
- }
-
- return ((duty_cycle * 1000) / per);
-}
-/**
- * \brief Check if PWM is running
- */
-bool _tc_is_pwm_enabled(const struct _pwm_device *const device)
-{
- return hri_tc_get_CTRLA_ENABLE_bit(device->hw);
-}
-/**
- * \brief Enable/disable PWM interrupt
- */
-void _tc_pwm_set_irq_state(struct _pwm_device *const device, const enum _pwm_callback_type type, const bool disable)
-{
- ASSERT(device);
-
- if (PWM_DEVICE_PERIOD_CB == type) {
- hri_tc_write_INTEN_OVF_bit(device->hw, disable);
- } else if (PWM_DEVICE_ERROR_CB == type) {
- hri_tc_write_INTEN_ERR_bit(device->hw, disable);
- }
-}
-
-/**
- * \brief Retrieve timer helper functions
- */
-struct _timer_hpl_interface *_tc_get_timer(void)
-{
- return NULL;
-}
-
-/**
- * \brief Retrieve pwm helper functions
- */
-struct _pwm_hpl_interface *_tc_get_pwm(void)
-{
- return &_tc_pwm_functions;
-}
-/**
- * \internal TC interrupt handler for PWM
- *
- * \param[in] instance TC instance number
- */
-static void tc_pwm_interrupt_handler(struct _pwm_device *device)
-{
- void *const hw = device->hw;
-
- if (hri_tc_get_interrupt_OVF_bit(hw)) {
- hri_tc_clear_interrupt_OVF_bit(hw);
- if (NULL != device->callback.pwm_period_cb) {
- device->callback.pwm_period_cb(device);
- }
- }
- if (hri_tc_get_INTEN_ERR_bit(hw)) {
- hri_tc_clear_interrupt_ERR_bit(hw);
- if (NULL != device->callback.pwm_error_cb) {
- device->callback.pwm_error_cb(device);
- }
- }
-}
-
-/**
- * \brief TC interrupt handler
- */
-void TC3_Handler(void)
-{
- tc_pwm_interrupt_handler(_tc3_dev);
-}
-
-/**
- * \internal Retrieve TC index
- *
- * \param[in] hw The pointer to hardware instance
- *
- * \return The index of TC configuration
- */
-static int8_t get_tc_index(const void *const hw)
-{
- uint8_t index = _get_hardware_offset(hw);
- uint8_t i;
-
- for (i = 0; i < ARRAY_SIZE(_tcs); i++) {
- if (_tcs[i].number == index) {
- return i;
- }
- }
-
- ASSERT(false);
- return -1;
-}
-
-/**
- * \brief Init irq param with the given tc hardware instance
- */
-static void _tc_init_irq_param(const void *const hw, void *dev)
-{
- if (hw == TC3) {
- _tc3_dev = (struct _pwm_device *)dev;
- }
-}
-
-/**
- * \internal Retrieve TC hardware index
- *
- * \param[in] hw The pointer to hardware instance
- */
-static inline uint8_t _get_hardware_offset(const void *const hw)
-{
- return (((uint32_t)hw - (uint32_t)TC0) >> 10);
-}
diff --git a/Smol Watch Project/My Project/hpl/tc/hpl_tc_base.h b/Smol Watch Project/My Project/hpl/tc/hpl_tc_base.h
deleted file mode 100644
index d602ae6..0000000
--- a/Smol Watch Project/My Project/hpl/tc/hpl_tc_base.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * \file
- *
- * \brief SAM Timer/Counter
- *
- * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
- *
- * \asf_license_start
- *
- * \page License
- *
- * Subject to your compliance with these terms, you may use Microchip
- * software and any derivatives exclusively with Microchip products.
- * It is your responsibility to comply with third party license terms applicable
- * to your use of third party software (including open source software) that
- * may accompany Microchip software.
- *
- * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
- * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
- * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
- * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
- * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
- * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
- * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
- * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
- * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
- * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
- * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
- *
- * \asf_license_stop
- */
-
-#ifndef _HPL_TC_BASE_H_INCLUDED
-#define _HPL_TC_BASE_H_INCLUDED
-
-#include
-#include
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \addtogroup tc_group TC Hardware Proxy Layer
- *
- * \section tc_hpl_rev Revision History
- * - v0.0.0.1 Initial Commit
- *
- *@{
- */
-
-/**
- * \name HPL functions
- */
-//@{
-
-/**
- * \brief Retrieve timer helper functions
- *
- * \return A pointer to set of timer helper functions
- */
-struct _timer_hpl_interface *_tc_get_timer(void);
-/**
- * \brief Initialize TC for PWM
- *
- * This function does low level TC configuration.
- *
- * \param[in] device The pointer to TC device instance
- * \param[in] hw The pointer to hardware instance
- *
- * \return Initialization status.
- */
-int32_t _tc_pwm_init(struct _pwm_device *const device, void *const hw);
-
-/**
- * \brief De-initialize TC for PWM
- *
- * \param[in] device The pointer to TC device instance
- */
-void _tc_pwm_deinit(struct _pwm_device *const device);
-
-/**
- * \brief Retrieve offset of the given tc hardware instance
- *
- * \param[in] device The pointer to TC device instance
- *
- * \return The offset of the given tc hardware instance
- */
-uint8_t _tc_pwm_get_hardware_offset(const struct _pwm_device *const device);
-
-/**
- * \brief Start PWM
- *
- * \param[in] device The pointer to TC device instance
- */
-void _tc_start_pwm(struct _pwm_device *const device);
-
-/**
- * \brief Stop PWM
- *
- * \param[in] device The pointer to TC device instance
- */
-void _tc_stop_pwm(struct _pwm_device *const device);
-
-/**
- * \brief Check if PWM is running
- *
- * \param[in] device The pointer to TC device instance
- *
- * \return Check status.
- * \retval true The given timer is running
- * \retval false The given timer is not running
- */
-bool _tc_is_pwm_enabled(const struct _pwm_device *const device);
-
-/**
- * \brief Set PWM parameter
- * \param[in] device The pointer to TC device instance
- * \param[in] period Total period of one PWM cycle.
- * \param[in] duty_cycle Period of PWM first half during one cycle.
- */
-void _tc_set_pwm_param(struct _pwm_device *const device, const pwm_period_t period, const pwm_period_t duty_cycle);
-
-/**
- * \brief Get pwm waveform period value
- * \param[in] device The pointer to TC device instance
- * \return Period value.
- */
-pwm_period_t _tc_pwm_get_period(const struct _pwm_device *const device);
-
-/**
- * \brief Get pwm waveform duty cycle value
- * \param[in] device The pointer to TC device instance
- * \return Duty cycle value
- */
-uint32_t _tc_pwm_get_duty(const struct _pwm_device *const device);
-
-/**
- * \brief Enable/disable PWM interrupt
- *
- * param[in] device The pointer to PWM device instance
- * param[in] type The type of interrupt to disable/enable if applicable
- * param[in] disable Enable or disable
- */
-void _tc_pwm_set_irq_state(struct _pwm_device *const device, const enum _pwm_callback_type type, const bool disable);
-
-/**
- * \brief Retrieve pwm helper functions
- *
- * \return A pointer to set of pwm helper functions
- */
-struct _pwm_hpl_interface *_tc_get_pwm(void);
-
-//@}
-/**@}*/
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _HPL_TC_BASE_H_INCLUDED */
diff --git a/Smol Watch Project/My Project/hpl/tc/tc_lite.c b/Smol Watch Project/My Project/hpl/tc/tc_lite.c
new file mode 100644
index 0000000..9ae2f99
--- /dev/null
+++ b/Smol Watch Project/My Project/hpl/tc/tc_lite.c
@@ -0,0 +1,101 @@
+
+/**
+ * \file
+ *
+ * \brief TC related functionality implementation.
+ *
+ * Copyright (c) 2017 Microchip Technology Inc. and its subsidiaries.
+ *
+ * \asf_license_start
+ *
+ * \page License
+ *
+ * Subject to your compliance with these terms, you may use Microchip
+ * software and any derivatives exclusively with Microchip products.
+ * It is your responsibility to comply with third party license terms applicable
+ * to your use of third party software (including open source software) that
+ * may accompany Microchip software.
+ *
+ * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
+ * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
+ * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
+ * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
+ * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
+ * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
+ * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
+ * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
+ * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
+ * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
+ *
+ * \asf_license_stop
+ *
+ */
+
+#include "tc_lite.h"
+
+/**
+ * \brief Initialize TC interface
+ */
+int8_t PWM_0_init()
+{
+
+ if (!hri_tc_is_syncing(TC3, TC_SYNCBUSY_SWRST)) {
+ if (hri_tc_get_CTRLA_reg(TC3, TC_CTRLA_ENABLE)) {
+ hri_tc_clear_CTRLA_ENABLE_bit(TC3);
+ hri_tc_wait_for_sync(TC3, TC_SYNCBUSY_ENABLE);
+ }
+ hri_tc_write_CTRLA_reg(TC3, TC_CTRLA_SWRST);
+ }
+ hri_tc_wait_for_sync(TC3, TC_SYNCBUSY_SWRST);
+
+ hri_tc_write_CTRLA_reg(TC3,
+ 0 << TC_CTRLA_COPEN0_Pos /* Capture Pin 0 Enable: disabled */
+ | 0 << TC_CTRLA_COPEN1_Pos /* Capture Pin 1 Enable: disabled */
+ | 0 << TC_CTRLA_CAPTEN0_Pos /* Capture Channel 0 Enable: disabled */
+ | 0 << TC_CTRLA_CAPTEN1_Pos /* Capture Channel 1 Enable: disabled */
+ | 0 << TC_CTRLA_ALOCK_Pos /* Auto Lock: disabled */
+ | 0 << TC_CTRLA_PRESCSYNC_Pos /* Prescaler and Counter Synchronization: 0 */
+ | 0 << TC_CTRLA_ONDEMAND_Pos /* Clock On Demand: disabled */
+ | 0 << TC_CTRLA_RUNSTDBY_Pos /* Run in Standby: disabled */
+ | 0 << TC_CTRLA_PRESCALER_Pos /* Setting: 0 */
+ | 0x1 << TC_CTRLA_MODE_Pos); /* Operating Mode: 0x1 */
+
+ hri_tc_write_CTRLB_reg(TC3,
+ 0 << TC_CTRLBSET_CMD_Pos /* Command: 0 */
+ | 0 << TC_CTRLBSET_ONESHOT_Pos /* One-Shot: disabled */
+ | 0 << TC_CTRLBCLR_LUPD_Pos /* Setting: disabled */
+ | 0 << TC_CTRLBSET_DIR_Pos); /* Counter Direction: disabled */
+
+ // hri_tc_write_WAVE_reg(TC3,0); /* Waveform Generation Mode: 0 */
+
+ // hri_tc_write_DRVCTRL_reg(TC3,0 << TC_DRVCTRL_INVEN1_Pos /* Output Waveform 1 Invert Enable: disabled */
+ // | 0 << TC_DRVCTRL_INVEN0_Pos); /* Output Waveform 0 Invert Enable: disabled */
+
+ // hri_tc_write_DBGCTRL_reg(TC3,0); /* Run in debug: 0 */
+
+ // hri_tccount8_write_CC_reg(TC3, 0 ,0x0); /* Compare/Capture Value: 0x0 */
+
+ // hri_tccount8_write_CC_reg(TC3, 1 ,0x0); /* Compare/Capture Value: 0x0 */
+
+ // hri_tccount8_write_COUNT_reg(TC3,0x0); /* Counter Value: 0x0 */
+
+ // hri_tc_write_PER_reg(TC3,0x0); /* Period Value: 0x0 */
+
+ // hri_tc_write_EVCTRL_reg(TC3,0 << TC_EVCTRL_MCEO0_Pos /* Match or Capture Channel 0 Event Output Enable: disabled
+ // */
+ // | 0 << TC_EVCTRL_MCEO1_Pos /* Match or Capture Channel 1 Event Output Enable: disabled */
+ // | 0 << TC_EVCTRL_OVFEO_Pos /* Overflow/Underflow Event Output Enable: disabled */
+ // | 0 << TC_EVCTRL_TCEI_Pos /* TC Event Input: disabled */
+ // | 0 << TC_EVCTRL_TCINV_Pos /* TC Inverted Event Input: disabled */
+ // | 0); /* Event Action: 0 */
+
+ // hri_tc_write_INTEN_reg(TC3,0 << TC_INTENSET_MC0_Pos /* Match or Capture Channel 0 Interrupt Enable: disabled */
+ // | 0 << TC_INTENSET_MC1_Pos /* Match or Capture Channel 1 Interrupt Enable: disabled */
+ // | 0 << TC_INTENSET_ERR_Pos /* Error Interrupt Enable: disabled */
+ // | 0 << TC_INTENSET_OVF_Pos); /* Overflow Interrupt enable: disabled */
+
+ hri_tc_write_CTRLA_ENABLE_bit(TC3, 1 << TC_CTRLA_ENABLE_Pos); /* Enable: enabled */
+
+ return 0;
+}
diff --git a/Smol Watch Project/My Project/hpl/tc/tc_lite.h b/Smol Watch Project/My Project/hpl/tc/tc_lite.h
new file mode 100644
index 0000000..e21efa9
--- /dev/null
+++ b/Smol Watch Project/My Project/hpl/tc/tc_lite.h
@@ -0,0 +1,64 @@
+
+/**
+ * \file
+ *
+ * \brief TC related functionality declaration.
+ *
+ * Copyright (c) 2017 Microchip Technology Inc. and its subsidiaries.
+ *
+ * \asf_license_start
+ *
+ * \page License
+ *
+ * Subject to your compliance with these terms, you may use Microchip
+ * software and any derivatives exclusively with Microchip products.
+ * It is your responsibility to comply with third party license terms applicable
+ * to your use of third party software (including open source software) that
+ * may accompany Microchip software.
+ *
+ * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
+ * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
+ * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
+ * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
+ * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
+ * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
+ * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
+ * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
+ * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
+ * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
+ *
+ * \asf_license_stop
+ *
+ */
+
+#ifndef _TC_H_INCLUDED
+#define _TC_H_INCLUDED
+
+#include
+#include
+
+/**
+ * \addtogroup tc driver
+ *
+ * \section tc Revision History
+ * - v0.0.0.1 Initial Commit
+ *
+ *@{
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \brief Initialize tc interface
+ * \return Initialization status.
+ */
+int8_t PWM_0_init();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TC_H_INCLUDED */
diff --git a/Smol Watch Project/My Project/hpl/tcc/hpl_tcc.c b/Smol Watch Project/My Project/hpl/tcc/hpl_tcc.c
index 52fc6f3..43c4487 100644
--- a/Smol Watch Project/My Project/hpl/tcc/hpl_tcc.c
+++ b/Smol Watch Project/My Project/hpl/tcc/hpl_tcc.c
@@ -123,21 +123,6 @@ static struct tcc_pwm_cfg _cfgs_pwm[1] = {
static struct _pwm_device *_tcc0_dev = NULL;
-/**
- * \brief Set of pointer to hal_pwm helper functions
- */
-static struct _pwm_hpl_interface _tcc_pwm_functions = {
- _tcc_pwm_init,
- _tcc_pwm_deinit,
- _tcc_start_pwm,
- _tcc_stop_pwm,
- _tcc_set_pwm_param,
- _tcc_is_pwm_enabled,
- _tcc_pwm_get_period,
- _tcc_pwm_get_duty,
- _tcc_pwm_set_irq_state,
-};
-
/**
* \brief Init irq param with the given tcc hardware instance
*/
@@ -150,7 +135,7 @@ static void _tcc_init_irq_param(const void *const hw, void *dev)
/**
* \brief Initialize TCC for PWM mode
*/
-int32_t _tcc_pwm_init(struct _pwm_device *const device, void *const hw)
+int32_t _pwm_init(struct _pwm_device *const device, void *const hw)
{
struct tcc_cfg *cfg = _get_tcc_cfg(hw);
if (cfg == NULL) {
@@ -213,7 +198,7 @@ int32_t _tcc_pwm_init(struct _pwm_device *const device, void *const hw)
/**
* \brief De-initialize TCC for PWM mode
*/
-void _tcc_pwm_deinit(struct _pwm_device *const device)
+void _pwm_deinit(struct _pwm_device *const device)
{
void *const hw = device->hw;
struct tcc_pwm_cfg *cfg_pwm = _get_tcc_pwm_cfg(hw);
@@ -226,21 +211,21 @@ void _tcc_pwm_deinit(struct _pwm_device *const device)
/**
* \brief Start PWM
*/
-void _tcc_start_pwm(struct _pwm_device *const device)
+void _pwm_enable(struct _pwm_device *const device)
{
hri_tcc_set_CTRLA_ENABLE_bit(device->hw);
}
/**
* \brief Stop PWM
*/
-void _tcc_stop_pwm(struct _pwm_device *const device)
+void _pwm_disable(struct _pwm_device *const device)
{
hri_tcc_clear_CTRLA_ENABLE_bit(device->hw);
}
/**
* \brief Set PWM parameter
*/
-void _tcc_set_pwm_param(struct _pwm_device *const device, const pwm_period_t period, const pwm_period_t duty_cycle)
+void _pwm_set_param(struct _pwm_device *const device, const pwm_period_t period, const pwm_period_t duty_cycle)
{
void *const hw = device->hw;
struct tcc_pwm_cfg *cfg_pwm = _get_tcc_pwm_cfg(hw);
@@ -253,14 +238,14 @@ void _tcc_set_pwm_param(struct _pwm_device *const device, const pwm_period_t per
/**
* \brief Get pwm waveform period value
*/
-pwm_period_t _tcc_pwm_get_period(const struct _pwm_device *const device)
+pwm_period_t _pwm_get_period(const struct _pwm_device *const device)
{
return (pwm_period_t)(hri_tcc_read_PERB_reg(device->hw));
}
/**
* \brief Get pwm waveform duty cycle
*/
-uint32_t _tcc_pwm_get_duty(const struct _pwm_device *const device)
+uint32_t _pwm_get_duty(const struct _pwm_device *const device)
{
void *const hw = device->hw;
struct tcc_pwm_cfg *cfg_pwm = _get_tcc_pwm_cfg(hw);
@@ -275,14 +260,14 @@ uint32_t _tcc_pwm_get_duty(const struct _pwm_device *const device)
/**
* \brief Check if PWM is running
*/
-bool _tcc_is_pwm_enabled(const struct _pwm_device *const device)
+bool _pwm_is_enabled(const struct _pwm_device *const device)
{
return hri_tcc_get_CTRLA_ENABLE_bit(device->hw);
}
/**
* \brief Enable/disable PWM interrupt
*/
-void _tcc_pwm_set_irq_state(struct _pwm_device *const device, const enum _pwm_callback_type type, const bool disable)
+void _pwm_set_irq_state(struct _pwm_device *const device, const enum _pwm_callback_type type, const bool disable)
{
ASSERT(device);
@@ -306,7 +291,7 @@ struct _timer_hpl_interface *_tcc_get_timer(void)
*/
struct _pwm_hpl_interface *_tcc_get_pwm(void)
{
- return &_tcc_pwm_functions;
+ return NULL;
}
/**
* \internal TC interrupt handler for PWM
diff --git a/Smol Watch Project/My Project/hpl/tcc/hpl_tcc.h b/Smol Watch Project/My Project/hpl/tcc/hpl_tcc.h
index 6ccf04f..4ccac85 100644
--- a/Smol Watch Project/My Project/hpl/tcc/hpl_tcc.h
+++ b/Smol Watch Project/My Project/hpl/tcc/hpl_tcc.h
@@ -60,89 +60,6 @@ extern "C" {
* \return A pointer to set of timer helper functions
*/
struct _timer_hpl_interface *_tcc_get_timer(void);
-/**
- * \brief Initialize TCC for PWM
- *
- * This function does low level TCC configuration.
- *
- * \param[in] device The pointer to PWM device instance
- * \param[in] hw The pointer to hardware instance
- *
- * \return Initialization status.
- */
-int32_t _tcc_pwm_init(struct _pwm_device *const device, void *const hw);
-
-/**
- * \brief De-initialize TCC for PWM
- *
- * \param[in] device The pointer to TCC device instance
- */
-void _tcc_pwm_deinit(struct _pwm_device *const device);
-
-/**
- * \brief Retrieve offset of the given tcc hardware instance
- *
- * \param[in] device The pointer to TCC device instance
- *
- * \return The offset of the given tcc hardware instance
- */
-uint8_t _tcc_pwm_get_hardware_offset(const struct _pwm_device *const device);
-
-/**
- * \brief Start PWM
- *
- * \param[in] device The pointer to TCC device instance
- */
-void _tcc_start_pwm(struct _pwm_device *const device);
-
-/**
- * \brief Stop PWM
- *
- * \param[in] device The pointer to TCC device instance
- */
-void _tcc_stop_pwm(struct _pwm_device *const device);
-
-/**
- * \brief Check if PWM is running
- *
- * \param[in] device The pointer to TCC device instance
- *
- * \return Check status.
- * \retval true The given pwm is running
- * \retval false The given pwm is not running
- */
-bool _tcc_is_pwm_enabled(const struct _pwm_device *const device);
-
-/**
- * \brief Set PWM parameter
- * \param[in] device The pointer to TCC device instance
- * \param[in] period Total period of one PWM cycle.
- * \param[in] duty_cycle Period of PWM first half during one cycle.
- */
-void _tcc_set_pwm_param(struct _pwm_device *const device, const pwm_period_t period, const pwm_period_t duty_cycle);
-
-/**
- * \brief Get pwm waveform period value
- * \param[in] device The pointer to TCC device instance
- * \return Period value.
- */
-pwm_period_t _tcc_pwm_get_period(const struct _pwm_device *const device);
-
-/**
- * \brief Get pwm waveform duty cycle value
- * \param[in] device The pointer to TCC device instance
- * \return Duty cycle value
- */
-uint32_t _tcc_pwm_get_duty(const struct _pwm_device *const device);
-
-/**
- * \brief Enable/disable PWM interrupt
- *
- * param[in] device The pointer to PWM device instance
- * param[in] type The type of interrupt to disable/enable if applicable
- * param[in] disable Enable or disable
- */
-void _tcc_pwm_set_irq_state(struct _pwm_device *const device, const enum _pwm_callback_type type, const bool disable);
/**
* \brief Retrieve pwm helper functions
diff --git a/Smol Watch Project/My Project/watch-library/watch.c b/Smol Watch Project/My Project/watch-library/watch.c
index b40e57a..84a57d4 100644
--- a/Smol Watch Project/My Project/watch-library/watch.c
+++ b/Smol Watch Project/My Project/watch-library/watch.c
@@ -190,10 +190,15 @@ void watch_register_button_callback(Watch *watch, const uint32_t pin, ext_irq_cb
void watch_enable_led(Watch *watch) {
if (watch->led_enabled) return;
- PWM_0_init();
- pwm_set_parameters(&PWM_0, 10000, 0);
- pwm_enable(&PWM_0);
-
+ PWM_0_CLOCK_init();
+ PWM_0_PORT_init();
+ PWM_0_init();
+ TC3->COUNT8.CTRLA.reg = TC_CTRLA_SWRST;
+ TC3->COUNT8.CTRLA.bit.MODE |= TC_CTRLA_MODE_COUNT8_Val;
+ TC3->COUNT8.PER.reg = 255;
+ TC3->COUNT8.WAVE.reg = TC_WAVE_WAVEGEN_NPWM;
+ TC3->COUNT8.CTRLA.reg |= TC_CTRLA_ENABLE;
+
watch->led_enabled = true;
watch_set_led_off();
}
@@ -204,23 +209,23 @@ void watch_disable_led(Watch *watch) {
gpio_set_pin_function(RED, GPIO_PIN_FUNCTION_OFF);
gpio_set_pin_function(GREEN, GPIO_PIN_FUNCTION_OFF);
- pwm_disable(&PWM_0);
+ hri_tc_clear_CTRLA_ENABLE_bit(TC3);
hri_mclk_clear_APBCMASK_TC3_bit(MCLK);
watch->led_enabled = false;
}
-void watch_set_led_color(uint16_t red, uint16_t green) {
- TC3->COUNT16.CC[0].reg = red;
- TC3->COUNT16.CC[1].reg = green;
+void watch_set_led_color(uint8_t red, uint8_t green) {
+ TC3->COUNT8.CC[0].reg = red;
+ TC3->COUNT8.CC[1].reg = green;
}
void watch_set_led_red() {
- watch_set_led_color(65535, 0);
+ watch_set_led_color(255, 0);
}
void watch_set_led_green() {
- watch_set_led_color(0, 65535);
+ watch_set_led_color(0, 255);
}
void watch_set_led_off() {
diff --git a/Smol Watch Project/My Project/watch-library/watch.h b/Smol Watch Project/My Project/watch-library/watch.h
index 860102f..dc48c89 100644
--- a/Smol Watch Project/My Project/watch-library/watch.h
+++ b/Smol Watch Project/My Project/watch-library/watch.h
@@ -34,7 +34,7 @@ void watch_display_string(Watch *watch, char *string, uint8_t position);
void watch_enable_led(Watch *watch);
void watch_disable_led(Watch *watch);
-void watch_set_led_color(uint16_t red, uint16_t green);
+void watch_set_led_color(uint8_t red, uint8_t green);
void watch_set_led_red();
void watch_set_led_green();
void watch_set_led_off();