Upload original 计算机组成原理课程实践 学分×2 陈媛媛 course files (part 19)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/ccp.h+76-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/clkctrl.h+43-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/cpuint.h+43-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/driver_init.h+62-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/port.h+718-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/protected_io.h+83-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/rstctrl.h+68-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/rtc.h+44-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/slpctrl.h+45-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/system.h+72-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/main.c+258-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/project.elf.asm+1-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/bod.c+56-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/clkctrl.c+65-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/cpuint.c+62-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/driver_init.c+415-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/protected_io.S+95-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/rtc.c+77-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/slpctrl.c+56-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler.h+61-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler/gas.h+127-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler/iar.h+116-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/atomic.h+125-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/compiler.h+92-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/interrupt_avr8.h+111-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/utils.h+73-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/utils_assert.h+84-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR182/AVR182.pdf
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR182/Zero Cross Detector.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR241/AVR241.pdf
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR241/LCD Driver.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Anode LED/Arduino & RGB Common Anode LED ShiftPWM.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Cathode LED/Arduino & RGB Common Cathode LED Rainbow.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Cathode LED/Arduino & RGB Common Cathode LED.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 16 Channel Pwm Shield/Arduino 16 Channel Pwm Shield - PWM test.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 16 Channel Pwm Shield/Arduino 16 Channel Pwm Shield - Servo test.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 168 DDS generator/Arduino 168 DDS generator.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 4 channel Relay/Arduino 4 channel Relay.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 7-segment using 74HC595 Shift Register/Arduino 7-segment & terminal using 74HC595 Shift Register.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 7-segment using 74HC595 Shift Register/Arduino 7-segment using 74HC595 Shift Register.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 74HC595 Shift Register/Arduino 74HC595 Shift Register.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino AD8495 K-Type Thermocouple Amplifier/Arduino AD8495 K-Type Thermocouple Amplfier.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino BME280 Adafruit/Adafruit_BME280_SPI.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino BMP180 Adafruit/bmp180_test.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Cyrillic LCD/Arduino Cyrillic LCD.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Cyrillic LCD/cyrillic.bmp
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DHT22 Humidity & Temperature sensor/Arduino DHT22 Humidity & Temperature sensor.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS1302 RTC/Arduino DS1302 RTC.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS18B20 OneWire/Arduino DS18B20 OneWire.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS2408 Port Expander Switch/Arduino DS2408 Port Expander Switch.pdsprj
123version https://git-lfs.github.com/spec/v1oid sha256:2308f6d0188b94e63cd63151e8d85721bf39ff1d6d6f7eec6781b6f5fcfc71c3size 244712345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576/*** \file** \brief Configuration Change Protection write functions*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**/#ifndef CPU_CCP_H#define CPU_CCP_H#include <compiler.h>#include <protected_io.h>#ifdef __cplusplusextern "C" {#endif/*** \brief Write to a CCP-protected 8-bit I/O register** \param addr Address of the I/O register* \param value Value to be written** \note Using IAR Embedded workbench, the choice of memory model has an impact* on calling convention. The memory model is not visible to the* preprocessor, so it must be defined in the Assembler preprocessor directives.*/static inline void ccp_write_io(void *addr, uint8_t value){protected_write_io(addr, CCP_IOREG_gc, value);}/** @} *//*** \brief Write to CCP-protected 8-bit SPM register** \param addr Address of the SPM register* \param value Value to be written** \note Using IAR Embedded workbench, the choice of memory model has an impact* on calling convention. The memory model is not visible to the* preprocessor, so it must be defined in the Assembler preprocessor directives.*/static inline void ccp_write_spm(void *addr, uint8_t value){protected_write_io(addr, CCP_SPM_gc, value);}/** @} */#ifdef __cplusplus}#endif#endif /* CPU_CCP_H */
123version https://git-lfs.github.com/spec/v1oid sha256:c563fcd9f86878f5d826e378c5019e202a09e841ad23c6e72ae7cc93a5f4ddedsize 145312345678910111213141516171819202122232425262728293031323334353637383940414243/*** \file** \brief CLKCTRL related functionality declaration.*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**/#ifndef CLKCTRL_H_INCLUDED#define CLKCTRL_H_INCLUDED#include <compiler.h>#ifdef __cplusplusextern "C" {#endifint8_t CLKCTRL_init();#ifdef __cplusplus}#endif#endif /* CLKCTRL_H_INCLUDED */
123version https://git-lfs.github.com/spec/v1oid sha256:d2374c2edca20a8476e1d05daa5a98473ec7f2ab1979f03900658756da2a2b76size 145112345678910111213141516171819202122232425262728293031323334353637383940414243/*** \file** \brief CPUINT related functionality implementation.*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**/#ifndef CPUINT_H_INCLUDED#define CPUINT_H_INCLUDED#include <compiler.h>#ifdef __cplusplusextern "C" {#endifint8_t CPUINT_init();#ifdef __cplusplus}#endif#endif /* CPUINT_H_INCLUDED */
123version https://git-lfs.github.com/spec/v1oid sha256:18a4fd1366d34c3cdb68839b92aae497773eebe8ffb6dafe3389ddf42ddd68easize 18461234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162/*** \file** \brief Driver initialization.*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**//** Code generated by START.** This file will be overwritten when reconfiguring your START project.* Please copy examples or other code you want to keep to a separate file* to avoid losing it when reconfiguring.*/#ifndef DRIVER_INIT_H_INCLUDED#define DRIVER_INIT_H_INCLUDED#include <compiler.h>#include <clock_config.h>#include <port.h>#include <atmel_start_pins.h>#include <clkctrl.h>#include <rtc.h>#include <cpuint.h>#include <slpctrl.h>#include <bod.h>#ifdef __cplusplusextern "C" {#endifvoid system_init(void);#ifdef __cplusplus}#endif#endif /* DRIVER_INIT_H_INCLUDED */
123version https://git-lfs.github.com/spec/v1oid sha256:0798f1f0e546367f32c5dc9bc8a5dcd07fa62a4ab5a4cba51db6d7cec66e7f90size 18463123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718/*** \file** \brief Port related support*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**/#ifndef PORT_INCLUDED#define PORT_INCLUDED#ifdef __cplusplusextern "C" {#endif#include <compiler.h>enum port_pull_mode {PORT_PULL_OFF,PORT_PULL_UP,};enum port_dir {PORT_DIR_IN,PORT_DIR_OUT,PORT_DIR_OFF,};/*** \brief Set port pin pull mode** Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used** \param[in] pin The pin number within port* \param[in] pull_mode Pin pull mode*/static inline void PORTA_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode){volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);if (pull_mode == PORT_PULL_UP) {*port_pin_ctrl |= PORT_PULLUPEN_bm;} else if (pull_mode == PORT_PULL_OFF) {*port_pin_ctrl &= ~PORT_PULLUPEN_bm;}}/*** \brief Set port pin inverted mode** Configure pin invert I/O or not** \param[in] pin The pin number within port* \param[in] inverted Pin inverted mode*/static inline void PORTA_pin_set_inverted(const uint8_t pin, const bool inverted){volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);if (inverted) {*port_pin_ctrl |= PORT_INVEN_bm;} else {*port_pin_ctrl &= ~PORT_INVEN_bm;}}/*** \brief Set port pin input/sense configuration** Enable/disable digital input buffer and pin change interrupt,* select pin interrupt edge/level sensing mode** \param[in] pin pin number within port* \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled* PORT_ISC_BOTHEDGES_gc = Sense Both Edges* PORT_ISC_RISING_gc = Sense Rising Edge* PORT_ISC_FALLING_gc = Sense Falling Edge* PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled* PORT_ISC_LEVEL_gc = Sense low Level**/static inline void PORTA_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc){volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);*port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;}/*** \brief Set port data direction** Select if the pin data direction is input, output or disabled.* If disabled state is not possible, this function throws an assert.** \param[in] mask Bit mask where 1 means apply direction setting to the* corresponding pin* \param[in] dir PORT_DIR_IN = Data direction in* PORT_DIR_OUT = Data direction out* PORT_DIR_OFF = Disables the pin* (low power state)*/static inline void PORTA_set_port_dir(const uint8_t mask, const enum port_dir dir){switch (dir) {case PORT_DIR_IN:VPORTA.DIR &= ~mask;break;case PORT_DIR_OUT:VPORTA.DIR |= mask;break;case PORT_DIR_OFF:/*/ should activate the pullup for power savingbut a bit costly to do it here */{for (uint8_t i = 0; i < 8; i++) {if (mask & 1 << i) {*((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;}}}break;default:break;}}/*** \brief Set port pin data direction** Select if the pin data direction is input, output or disabled.* If disabled state is not possible, this function throws an assert.** \param[in] pin The pin number within port* \param[in] dir PORT_DIR_IN = Data direction in* PORT_DIR_OUT = Data direction out* PORT_DIR_OFF = Disables the pin* (low power state)*/static inline void PORTA_set_pin_dir(const uint8_t pin, const enum port_dir dir){switch (dir) {case PORT_DIR_IN:VPORTA.DIR &= ~(1 << pin);break;case PORT_DIR_OUT:VPORTA.DIR |= (1 << pin);break;case PORT_DIR_OFF:*((uint8_t *)&PORTA + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;break;default:break;}}/*** \brief Set port level** Sets output level on the pins defined by the bit mask** \param[in] mask Bit mask where 1 means apply port level to the corresponding* pin* \param[in] level true = Pin levels set to "high" state* false = Pin levels set to "low" state*/static inline void PORTA_set_port_level(const uint8_t mask, const bool level){if (level == true) {VPORTA.OUT |= mask;} else {VPORTA.OUT &= ~mask;}}/*** \brief Set port level** Sets output level on a pin** \param[in] pin The pin number within port* \param[in] level true = Pin level set to "high" state* false = Pin level set to "low" state*/static inline void PORTA_set_pin_level(const uint8_t pin, const bool level){if (level == true) {VPORTA.OUT |= (1 << pin);} else {VPORTA.OUT &= ~(1 << pin);}}/*** \brief Toggle out level on pins** Toggle the pin levels on pins defined by bit mask** \param[in] mask Bit mask where 1 means toggle pin level to the corresponding* pin*/static inline void PORTA_toggle_port_level(const uint8_t mask){PORTA.OUTTGL = mask;}/*** \brief Toggle output level on pin** Toggle the pin levels on pins defined by bit mask** \param[in] pin The pin number within port*/static inline void PORTA_toggle_pin_level(const uint8_t pin){VPORTA.IN |= 1 << pin;}/*** \brief Get input level on pins** Read the input level on pins connected to a port**/static inline uint8_t PORTA_get_port_level(){return VPORTA.IN;}/*** \brief Get level on pin** Reads the level on pins connected to a port*/static inline bool PORTA_get_pin_level(const uint8_t pin){return VPORTA.IN & (1 << pin);}/*** \brief Write value to Port** Write directly to the port OUT register** \param[in] value Value to write to the port register*/static inline void PORTA_write_port(const uint8_t value){VPORTA.OUT = value;}/*** \brief Set port pin pull mode** Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used** \param[in] pin The pin number within port* \param[in] pull_mode Pin pull mode*/static inline void PORTB_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode){volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);if (pull_mode == PORT_PULL_UP) {*port_pin_ctrl |= PORT_PULLUPEN_bm;} else if (pull_mode == PORT_PULL_OFF) {*port_pin_ctrl &= ~PORT_PULLUPEN_bm;}}/*** \brief Set port pin inverted mode** Configure pin invert I/O or not** \param[in] pin The pin number within port* \param[in] inverted Pin inverted mode*/static inline void PORTB_pin_set_inverted(const uint8_t pin, const bool inverted){volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);if (inverted) {*port_pin_ctrl |= PORT_INVEN_bm;} else {*port_pin_ctrl &= ~PORT_INVEN_bm;}}/*** \brief Set port pin input/sense configuration** Enable/disable digital input buffer and pin change interrupt,* select pin interrupt edge/level sensing mode** \param[in] pin pin number within port* \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled* PORT_ISC_BOTHEDGES_gc = Sense Both Edges* PORT_ISC_RISING_gc = Sense Rising Edge* PORT_ISC_FALLING_gc = Sense Falling Edge* PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled* PORT_ISC_LEVEL_gc = Sense low Level**/static inline void PORTB_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc){volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);*port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;}/*** \brief Set port data direction** Select if the pin data direction is input, output or disabled.* If disabled state is not possible, this function throws an assert.** \param[in] mask Bit mask where 1 means apply direction setting to the* corresponding pin* \param[in] dir PORT_DIR_IN = Data direction in* PORT_DIR_OUT = Data direction out* PORT_DIR_OFF = Disables the pin* (low power state)*/static inline void PORTB_set_port_dir(const uint8_t mask, const enum port_dir dir){switch (dir) {case PORT_DIR_IN:VPORTB.DIR &= ~mask;break;case PORT_DIR_OUT:VPORTB.DIR |= mask;break;case PORT_DIR_OFF:/*/ should activate the pullup for power savingbut a bit costly to do it here */{for (uint8_t i = 0; i < 8; i++) {if (mask & 1 << i) {*((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;}}}break;default:break;}}/*** \brief Set port pin data direction** Select if the pin data direction is input, output or disabled.* If disabled state is not possible, this function throws an assert.** \param[in] pin The pin number within port* \param[in] dir PORT_DIR_IN = Data direction in* PORT_DIR_OUT = Data direction out* PORT_DIR_OFF = Disables the pin* (low power state)*/static inline void PORTB_set_pin_dir(const uint8_t pin, const enum port_dir dir){switch (dir) {case PORT_DIR_IN:VPORTB.DIR &= ~(1 << pin);break;case PORT_DIR_OUT:VPORTB.DIR |= (1 << pin);break;case PORT_DIR_OFF:*((uint8_t *)&PORTB + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;break;default:break;}}/*** \brief Set port level** Sets output level on the pins defined by the bit mask** \param[in] mask Bit mask where 1 means apply port level to the corresponding* pin* \param[in] level true = Pin levels set to "high" state* false = Pin levels set to "low" state*/static inline void PORTB_set_port_level(const uint8_t mask, const bool level){if (level == true) {VPORTB.OUT |= mask;} else {VPORTB.OUT &= ~mask;}}/*** \brief Set port level** Sets output level on a pin** \param[in] pin The pin number within port* \param[in] level true = Pin level set to "high" state* false = Pin level set to "low" state*/static inline void PORTB_set_pin_level(const uint8_t pin, const bool level){if (level == true) {VPORTB.OUT |= (1 << pin);} else {VPORTB.OUT &= ~(1 << pin);}}/*** \brief Toggle out level on pins** Toggle the pin levels on pins defined by bit mask** \param[in] mask Bit mask where 1 means toggle pin level to the corresponding* pin*/static inline void PORTB_toggle_port_level(const uint8_t mask){PORTB.OUTTGL = mask;}/*** \brief Toggle output level on pin** Toggle the pin levels on pins defined by bit mask** \param[in] pin The pin number within port*/static inline void PORTB_toggle_pin_level(const uint8_t pin){VPORTB.IN |= 1 << pin;}/*** \brief Get input level on pins** Read the input level on pins connected to a port**/static inline uint8_t PORTB_get_port_level(){return VPORTB.IN;}/*** \brief Get level on pin** Reads the level on pins connected to a port*/static inline bool PORTB_get_pin_level(const uint8_t pin){return VPORTB.IN & (1 << pin);}/*** \brief Write value to Port** Write directly to the port OUT register** \param[in] value Value to write to the port register*/static inline void PORTB_write_port(const uint8_t value){VPORTB.OUT = value;}/*** \brief Set port pin pull mode** Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used** \param[in] pin The pin number within port* \param[in] pull_mode Pin pull mode*/static inline void PORTC_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode){volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);if (pull_mode == PORT_PULL_UP) {*port_pin_ctrl |= PORT_PULLUPEN_bm;} else if (pull_mode == PORT_PULL_OFF) {*port_pin_ctrl &= ~PORT_PULLUPEN_bm;}}/*** \brief Set port pin inverted mode** Configure pin invert I/O or not** \param[in] pin The pin number within port* \param[in] inverted Pin inverted mode*/static inline void PORTC_pin_set_inverted(const uint8_t pin, const bool inverted){volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);if (inverted) {*port_pin_ctrl |= PORT_INVEN_bm;} else {*port_pin_ctrl &= ~PORT_INVEN_bm;}}/*** \brief Set port pin input/sense configuration** Enable/disable digital input buffer and pin change interrupt,* select pin interrupt edge/level sensing mode** \param[in] pin pin number within port* \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled* PORT_ISC_BOTHEDGES_gc = Sense Both Edges* PORT_ISC_RISING_gc = Sense Rising Edge* PORT_ISC_FALLING_gc = Sense Falling Edge* PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled* PORT_ISC_LEVEL_gc = Sense low Level**/static inline void PORTC_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc){volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);*port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;}/*** \brief Set port data direction** Select if the pin data direction is input, output or disabled.* If disabled state is not possible, this function throws an assert.** \param[in] mask Bit mask where 1 means apply direction setting to the* corresponding pin* \param[in] dir PORT_DIR_IN = Data direction in* PORT_DIR_OUT = Data direction out* PORT_DIR_OFF = Disables the pin* (low power state)*/static inline void PORTC_set_port_dir(const uint8_t mask, const enum port_dir dir){switch (dir) {case PORT_DIR_IN:VPORTC.DIR &= ~mask;break;case PORT_DIR_OUT:VPORTC.DIR |= mask;break;case PORT_DIR_OFF:/*/ should activate the pullup for power savingbut a bit costly to do it here */{for (uint8_t i = 0; i < 8; i++) {if (mask & 1 << i) {*((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;}}}break;default:break;}}/*** \brief Set port pin data direction** Select if the pin data direction is input, output or disabled.* If disabled state is not possible, this function throws an assert.** \param[in] pin The pin number within port* \param[in] dir PORT_DIR_IN = Data direction in* PORT_DIR_OUT = Data direction out* PORT_DIR_OFF = Disables the pin* (low power state)*/static inline void PORTC_set_pin_dir(const uint8_t pin, const enum port_dir dir){switch (dir) {case PORT_DIR_IN:VPORTC.DIR &= ~(1 << pin);break;case PORT_DIR_OUT:VPORTC.DIR |= (1 << pin);break;case PORT_DIR_OFF:*((uint8_t *)&PORTC + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;break;default:break;}}/*** \brief Set port level** Sets output level on the pins defined by the bit mask** \param[in] mask Bit mask where 1 means apply port level to the corresponding* pin* \param[in] level true = Pin levels set to "high" state* false = Pin levels set to "low" state*/static inline void PORTC_set_port_level(const uint8_t mask, const bool level){if (level == true) {VPORTC.OUT |= mask;} else {VPORTC.OUT &= ~mask;}}/*** \brief Set port level** Sets output level on a pin** \param[in] pin The pin number within port* \param[in] level true = Pin level set to "high" state* false = Pin level set to "low" state*/static inline void PORTC_set_pin_level(const uint8_t pin, const bool level){if (level == true) {VPORTC.OUT |= (1 << pin);} else {VPORTC.OUT &= ~(1 << pin);}}/*** \brief Toggle out level on pins** Toggle the pin levels on pins defined by bit mask** \param[in] mask Bit mask where 1 means toggle pin level to the corresponding* pin*/static inline void PORTC_toggle_port_level(const uint8_t mask){PORTC.OUTTGL = mask;}/*** \brief Toggle output level on pin** Toggle the pin levels on pins defined by bit mask** \param[in] pin The pin number within port*/static inline void PORTC_toggle_pin_level(const uint8_t pin){VPORTC.IN |= 1 << pin;}/*** \brief Get input level on pins** Read the input level on pins connected to a port**/static inline uint8_t PORTC_get_port_level(){return VPORTC.IN;}/*** \brief Get level on pin** Reads the level on pins connected to a port*/static inline bool PORTC_get_pin_level(const uint8_t pin){return VPORTC.IN & (1 << pin);}/*** \brief Write value to Port** Write directly to the port OUT register** \param[in] value Value to write to the port register*/static inline void PORTC_write_port(const uint8_t value){VPORTC.OUT = value;}#ifdef __cplusplus}#endif#endif /* PORT_INCLUDED */
123version https://git-lfs.github.com/spec/v1oid sha256:7c2ac61bdf1f416d2be839bf6ade1eafb031e0db470f5264afa0aee361cd1bffsize 25021234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283/*** \file** \brief Configuration Change Protection write functions*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**/#ifndef PROTECTED_IO_H#define PROTECTED_IO_H#ifdef __cplusplusextern "C" {#endif#if defined(__DOXYGEN__)//! \name IAR Memory Model defines.//@{/*** \def CONFIG_MEMORY_MODEL_TINY* \brief Configuration symbol to enable 8 bit pointers.**/#define CONFIG_MEMORY_MODEL_TINY/*** \def CONFIG_MEMORY_MODEL_SMALL* \brief Configuration symbol to enable 16 bit pointers.* \note If no memory model is defined, SMALL is default.**/#define CONFIG_MEMORY_MODEL_SMALL/*** \def CONFIG_MEMORY_MODEL_LARGE* \brief Configuration symbol to enable 24 bit pointers.**/#define CONFIG_MEMORY_MODEL_LARGE//@}#endif/*** \brief Write to am 8-bit I/O register protected by CCP or a protection bit** \param addr Address of the I/O register* \param magic CCP magic value or Mask for protection bit* \param value Value to be written** \note Using IAR Embedded workbench, the choice of memory model has an impact* on calling convention. The memory model is not visible to the* preprocessor, so it must be defined in the Assembler preprocessor directives.*/extern void protected_write_io(void *addr, uint8_t magic, uint8_t value);/** @} */#ifdef __cplusplus}#endif#endif /* PROTECTED_IO_H */
123version https://git-lfs.github.com/spec/v1oid sha256:95683bb021c3f910f00644b12b4255df459652969ac5142b71b21f427de58150size 19591234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768/*** \file** \brief RSTCTRL*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**//*** \defgroup doc_driver_system_rstctrl Reset Controller* \ingroup doc_driver_system** \section doc_driver_rstctrl_rev Revision History* - v0.0.0.1 Initial Commit**@{*/#ifndef RSTCTRL_INCLUDED#define RSTCTRL_INCLUDED#ifdef __cplusplusextern "C" {#endif#include <ccp.h>static inline void RSTCTRL_reset(void){/* SWRR is protected with CCP */ccp_write_io((void *)&RSTCTRL.SWRR, 0x1);}static inline uint8_t RSTCTRL_get_reset_cause(void){return RSTCTRL.RSTFR;}static inline void RSTCTRL_clear_reset_cause(void){RSTCTRL.RSTFR= RSTCTRL_UPDIRF_bm | RSTCTRL_SWRF_bm | RSTCTRL_WDRF_bm | RSTCTRL_EXTRF_bm | RSTCTRL_BORF_bm | RSTCTRL_PORF_bm;}#ifdef __cplusplus}#endif#endif /* RSTCTRL_INCLUDED */
123version https://git-lfs.github.com/spec/v1oid sha256:41c5acd56d1af75f097c4656edca461f992a118e883394b19f448ef8b4a29f83size 14611234567891011121314151617181920212223242526272829303132333435363738394041424344/*** \file** \brief RTC related functionality declaration.*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**/#ifndef RTC_H_INCLUDED#define RTC_H_INCLUDED#include <compiler.h>#include <utils_assert.h>#ifdef __cplusplusextern "C" {#endifint8_t RTC_0_init();#ifdef __cplusplus}#endif#endif /* RTC_H_INCLUDED */
123version https://git-lfs.github.com/spec/v1oid sha256:9f2b43784c7e4acf5ae13aef4d58ecbcc664672766dc7cd3ac1e279befffc7aesize 1467123456789101112131415161718192021222324252627282930313233343536373839404142434445/*** \file** \brief SLPCTRL*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**/#ifndef SLPCTRL_INCLUDED#define SLPCTRL_INCLUDED#include <compiler.h>#ifdef __cplusplusextern "C" {#endifint8_t SLPCTRL_init();void SLPCTRL_set_sleep_mode(SLPCTRL_SMODE_t setmode);#ifdef __cplusplus}#endif#endif /* SLPCTRL_INCLUDED */
123version https://git-lfs.github.com/spec/v1oid sha256:9737656628a5b4132ead2b2d9254b7c4a26635ade0144da866ff3d2cfce7d335size 2117123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172/*** \file** \brief Tiny System Related Support*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**//*** \defgroup doc_driver_utils_mcu_init MCU Init* \ingroup doc_driver_utils** \section doc_driver_system_rev Revision History* - v0.0.0.1 Initial Commit**@{*/#ifndef SYSTEM_INCLUDED#define SYSTEM_INCLUDED#include "ccp.h"#include "port.h"#ifdef __cplusplusextern "C" {#endifvoid mcu_init(void){/* On AVR devices all peripherals are enable from power on reset, this* disables all peripherals to save power. Driver shall enable* peripheral if used *//* Set all pins to low power mode */for (uint8_t i = 0; i < 8; i++) {*((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;}for (uint8_t i = 0; i < 8; i++) {*((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;}for (uint8_t i = 0; i < 8; i++) {*((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;}}#ifdef __cplusplus}#endif#endif /* SYSTEM_INCLUDED */
123version https://git-lfs.github.com/spec/v1oid sha256:4bee52ede89e6e19828b325bd450a81205ebc9aaa3fd4391aea1935e173012ecsize 5552123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258/*\file main.c\brief Advanced Keypad Application(c) 2020 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR 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 KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*/#include <atmel_start.h>#include <avr/interrupt.h>#include <avr/sleep.h>#include <stdlib.h>#include <string.h>#define PRESS_VALID 0x01#define COLUMN_gm (PIN0_bm | PIN1_bm | PIN2_bm | PIN3_bm)#define COLUMN_PORT PORTCvolatile uint8_t key_pressed;char input_pass[20];uint8_t cursor = 0;char passcode[20] = "123ABC";/* Macro for buttons in the grid */char btn_value[16] = "123A456B789C*0#D";/* Function prototypes */void row_output_column_input(void);void row_input_column_output(void);void scan_keys(void);void btn_debounce(void);void lp_delay_ms(uint16_t delay);void check_passcode(void);int main(void){/* Initializes MCU, drivers and middleware */atmel_start_init();while(1){/* Sleep until key press wakes up the CPU */sleep_mode();/* PRESS_VALID flag in GPIOR0 is high if a valid press is detected */btn_debounce();/* If the key press was valid */if((GPIOR0 & PRESS_VALID) == PRESS_VALID){scan_keys();check_passcode();/* Wait for all buttons to be released */while((COLUMN_PORT.IN & COLUMN_gm) != COLUMN_gm){/* Sleep until key release wakes up the CPU */sleep_mode();}}}}void row_output_column_input(){ROW0_set_dir(PORT_DIR_OUT);ROW1_set_dir(PORT_DIR_OUT);ROW2_set_dir(PORT_DIR_OUT);ROW3_set_dir(PORT_DIR_OUT);COLUMN0_set_dir(PORT_DIR_IN);COLUMN1_set_dir(PORT_DIR_IN);COLUMN2_set_dir(PORT_DIR_IN);COLUMN3_set_dir(PORT_DIR_IN);}void row_input_column_output(){ROW0_set_dir(PORT_DIR_IN);ROW1_set_dir(PORT_DIR_IN);ROW2_set_dir(PORT_DIR_IN);ROW3_set_dir(PORT_DIR_IN);COLUMN0_set_dir(PORT_DIR_OUT);COLUMN1_set_dir(PORT_DIR_OUT);COLUMN2_set_dir(PORT_DIR_OUT);COLUMN3_set_dir(PORT_DIR_OUT);}void scan_keys(){key_pressed = 0;if(!COLUMN0_get_level()){key_pressed = 0;}else if(!COLUMN1_get_level()){key_pressed = 1;}else if(!COLUMN2_get_level()){key_pressed = 2;}else if(!COLUMN3_get_level()){key_pressed = 3;}row_input_column_output();if(!ROW0_get_level()){key_pressed += 0;}else if(!ROW1_get_level()){key_pressed += 4;}else if(!ROW2_get_level()){key_pressed += 8;}else if(!ROW3_get_level()){key_pressed += 12;}row_output_column_input();}void btn_debounce(){/* GPIOR0 bit 0 (PRESS_VALID) is press validation flag */GPIOR0 |= PRESS_VALID;for(uint8_t i = 0; i < 10; i++){/* If no button is pressed */if((COLUMN_PORT.IN & COLUMN_gm) == COLUMN_gm){GPIOR0 &= ~PRESS_VALID;break;}lp_delay_ms(2);}}void lp_delay_ms(uint16_t delay){volatile uint16_t pit_cnt = 0;/* Enable PIT interrupt */RTC.PITINTCTRL = RTC_PI_bm;/* Going to sleep until number of ms has been reached */while(pit_cnt != delay){sleep_mode();pit_cnt += 1;}/* Disable PIT interrupt */RTC.PITINTCTRL &= ~RTC_PI_bm;}int streq(const char* s1, const char* s2){while(*s1 == *s2){if (*s1 == '\0') return 0;s1++;s2++;}return 1;}void check_passcode(){/* If star is pressed */if(btn_value[key_pressed] == '*'){/* Reset input_pass */memset(input_pass, 0, sizeof(input_pass));cursor = 0;}/* If pound is pressed */else if(btn_value[key_pressed] == '#'){/* If input passcode is the same as the set passcode */if(!(streq(passcode, input_pass))){LED_GREEN_set_level(0);lp_delay_ms(500);LED_GREEN_set_level(1);}else{LED_RED_set_level(0);lp_delay_ms(500);LED_RED_set_level(1);}/* Reset input_pass */memset(input_pass, 0, sizeof(input_pass));cursor = 0;}/* If no special character (star or pound) is pressed */else{/* If length is not surpassed (20 characters) */if(cursor < 20){/* Record press */input_pass[cursor] = btn_value[key_pressed];cursor++;}else{cursor = 0;LED_RED_set_level(0);lp_delay_ms(250);LED_RED_set_level(1);lp_delay_ms(250);LED_RED_set_level(0);lp_delay_ms(250);LED_RED_set_level(1);/* Reset input_pass */memset(input_pass, 0, sizeof(input_pass));}}}ISR(PORTC_PORT_vect){/* Clear interrupt flag */COLUMN_PORT.INTFLAGS = COLUMN_gm;}ISR(RTC_PIT_vect){/* Clear interrupt flag */RTC.PITINTFLAGS = RTC_PI_bm;}
123version https://git-lfs.github.com/spec/v1oid sha256:cd0e828c83787d4281556bff410c9bf2c7dd3c891e895c4e0131cdd57d903a16size 211; Disassembled code
123version https://git-lfs.github.com/spec/v1oid sha256:093e6935df6ec02563a5c40309aa64d313cc6b8fef26cc150cf01f4e8d9ceb7dsize 19121234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556/*** \file** \brief BOD related functionality implementation.*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**//*** \defgroup doc_driver_system_bod Brown-Out Detector (BOD)* \ingroup doc_driver_system** \section doc_driver_bod_rev Revision History* - v0.0.0.1 Initial Commit**@{*/#include <bod.h>#include <ccp.h>/*** \brief Initialize Brownout Detector** \return Initialization status.*/int8_t BOD_init(){// ccp_write_io((void*)&(BOD.CTRLA),BOD_SLEEP_DIS_gc /* Disabled */);// BOD.INTCTRL = 0 << BOD_VLMIE_bp /* voltage level monitor interrrupt enable: disabled */// | BOD_VLMCFG_BELOW_gc; /* Interrupt when supply goes below VLM level */// BOD.VLMCTRLA = BOD_VLMLVL_5ABOVE_gc; /* VLM threshold 5% above BOD level */return 0;}
123version https://git-lfs.github.com/spec/v1oid sha256:788642b4cae916d8a2b58e76d85fd43072b12a013c0d91c7dfb94cd2623d0c72size 24701234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465/*** \file** \brief CLKCTRL related functionality implementation.*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**//*** \defgroup doc_driver_system_clkctrl Clock Controller* \ingroup doc_driver_system** \section doc_driver_clockctrl_rev Revision History* - v0.0.0.1 Initial Commit**@{*/#include <clkctrl.h>#include <ccp.h>/*** \brief Initialize clkctrl interface** \return Initialization status.*/int8_t CLKCTRL_init(){// ccp_write_io((void*)&(CLKCTRL.OSC32KCTRLA),0 << CLKCTRL_RUNSTDBY_bp /* Run standby: disabled */);// ccp_write_io((void*)&(CLKCTRL.XOSC32KCTRLA),CLKCTRL_CSUT_1K_gc /* 1k cycles */// | 0 << CLKCTRL_ENABLE_bp /* Enable: disabled */// | 0 << CLKCTRL_RUNSTDBY_bp /* Run standby: disabled */// | 0 << CLKCTRL_SEL_bp /* Select: disabled */);// ccp_write_io((void*)&(CLKCTRL.OSC20MCTRLA),0 << CLKCTRL_RUNSTDBY_bp /* Run standby: disabled */);// ccp_write_io((void*)&(CLKCTRL.MCLKCTRLB),CLKCTRL_PDIV_6X_gc /* 6 */// | 1 << CLKCTRL_PEN_bp /* Prescaler enable: enabled */);// ccp_write_io((void*)&(CLKCTRL.MCLKCTRLA),CLKCTRL_CLKSEL_OSC20M_gc /* 20MHz Internal Oscillator (OSC20M) */// | 0 << CLKCTRL_CLKOUT_bp /* System clock out: disabled */);// ccp_write_io((void*)&(CLKCTRL.MCLKLOCK),0 << CLKCTRL_LOCKEN_bp /* lock enable: disabled */);return 0;}
123version https://git-lfs.github.com/spec/v1oid sha256:96e7f77f0a2d75d960360943670c79e6e2a2e0827af651af8711316d3dbcd24bsize 21451234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162/*** \file** \brief CPUINT related functionality implementation.*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**//*** \defgroup doc_driver_system_cpuint CPU Interrupt Controller* \ingroup doc_driver_system** \section doc_driver_cpuint_rev Revision History* - v0.0.0.1 Initial Commit**@{*/#include <compiler.h>#include <cpuint.h>#include <ccp.h>#include <atomic.h>/*** \brief Initialize cpuint interface** \return Initialization status*/int8_t CPUINT_init(){/* IVSEL and CVT are Configuration Change Protected */// ccp_write_io((void*)&(CPUINT.CTRLA),0 << CPUINT_CVT_bp /* Compact Vector Table: disabled */// | 0 << CPUINT_IVSEL_bp /* Interrupt Vector Select: disabled */// | 0 << CPUINT_LVL0RR_bp /* Round-robin Scheduling Enable: disabled */);// CPUINT.LVL0PRI = 0x0 << CPUINT_LVL0PRI_gp; /* Interrupt Level Priority: 0x0 */// CPUINT.LVL1VEC = 0x0 << CPUINT_LVL1VEC_gp; /* Interrupt Vector with High Priority: 0x0 */ENABLE_INTERRUPTS();return 0;}
123version https://git-lfs.github.com/spec/v1oid sha256:b9e3876666dc5367c1c075ed6d723d34a133def17765202e8f348ecce90b9c10size 10784123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415/*** \file** \brief Driver initialization.*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**//** Code generated by START.** This file will be overwritten when reconfiguring your START project.* Please copy examples or other code you want to keep to a separate file* to avoid losing it when reconfiguring.*/#include "driver_init.h"#include <system.h>/*** \brief System initialization*/void system_init(){mcu_init();/* PORT setting on PA1 */ROW3_set_dir(// <y> Pin direction// <id> pad_dir// <PORT_DIR_OFF"> Off// <PORT_DIR_IN"> In// <PORT_DIR_OUT"> OutPORT_DIR_OUT);ROW3_set_level(// <y> Initial level// <id> pad_initial_level// <false"> Low// <true"> Highfalse);ROW3_set_pull_mode(// <y> Pull configuration// <id> pad_pull_config// <PORT_PULL_OFF"> Off// <PORT_PULL_UP"> Pull-upPORT_PULL_UP);ROW3_set_inverted(// <y> Invert I/O on pin// <id> pad_invert// <false"> Not inverted// <true"> Invertedfalse);ROW3_set_isc(// <y> Pin Input/Sense Configuration// <id> pad_isc// <PORT_ISC_INTDISABLE_gc"> Interrupt disabled but input buffer enabled// <PORT_ISC_BOTHEDGES_gc"> Sense Both Edges// <PORT_ISC_RISING_gc"> Sense Rising Edge// <PORT_ISC_FALLING_gc"> Sense Falling Edge// <PORT_ISC_INPUT_DISABLE_gc"> Digital Input Buffer disabled// <PORT_ISC_LEVEL_gc"> Sense low LevelPORT_ISC_INTDISABLE_gc);/* PORT setting on PA2 */ROW2_set_dir(// <y> Pin direction// <id> pad_dir// <PORT_DIR_OFF"> Off// <PORT_DIR_IN"> In// <PORT_DIR_OUT"> OutPORT_DIR_OUT);ROW2_set_level(// <y> Initial level// <id> pad_initial_level// <false"> Low// <true"> Highfalse);ROW2_set_pull_mode(// <y> Pull configuration// <id> pad_pull_config// <PORT_PULL_OFF"> Off// <PORT_PULL_UP"> Pull-upPORT_PULL_UP);ROW2_set_inverted(// <y> Invert I/O on pin// <id> pad_invert// <false"> Not inverted// <true"> Invertedfalse);ROW2_set_isc(// <y> Pin Input/Sense Configuration// <id> pad_isc// <PORT_ISC_INTDISABLE_gc"> Interrupt disabled but input buffer enabled// <PORT_ISC_BOTHEDGES_gc"> Sense Both Edges// <PORT_ISC_RISING_gc"> Sense Rising Edge// <PORT_ISC_FALLING_gc"> Sense Falling Edge// <PORT_ISC_INPUT_DISABLE_gc"> Digital Input Buffer disabled// <PORT_ISC_LEVEL_gc"> Sense low LevelPORT_ISC_INTDISABLE_gc);/* PORT setting on PB2 */// Set pin direction to outputLED_GREEN_set_dir(PORT_DIR_OUT);LED_GREEN_set_level(// <y> Initial level// <id> pad_initial_level// <false"> Low// <true"> Hightrue);/* PORT setting on PB3 */// Set pin direction to outputLED_RED_set_dir(PORT_DIR_OUT);LED_RED_set_level(// <y> Initial level// <id> pad_initial_level// <false"> Low// <true"> Hightrue);/* PORT setting on PB0_TWI */ROW0_set_dir(// <y> Pin direction// <id> pad_dir// <PORT_DIR_OFF"> Off// <PORT_DIR_IN"> In// <PORT_DIR_OUT"> OutPORT_DIR_OUT);ROW0_set_level(// <y> Initial level// <id> pad_initial_level// <false"> Low// <true"> Highfalse);ROW0_set_pull_mode(// <y> Pull configuration// <id> pad_pull_config// <PORT_PULL_OFF"> Off// <PORT_PULL_UP"> Pull-upPORT_PULL_UP);ROW0_set_inverted(// <y> Invert I/O on pin// <id> pad_invert// <false"> Not inverted// <true"> Invertedfalse);ROW0_set_isc(// <y> Pin Input/Sense Configuration// <id> pad_isc// <PORT_ISC_INTDISABLE_gc"> Interrupt disabled but input buffer enabled// <PORT_ISC_BOTHEDGES_gc"> Sense Both Edges// <PORT_ISC_RISING_gc"> Sense Rising Edge// <PORT_ISC_FALLING_gc"> Sense Falling Edge// <PORT_ISC_INPUT_DISABLE_gc"> Digital Input Buffer disabled// <PORT_ISC_LEVEL_gc"> Sense low LevelPORT_ISC_INTDISABLE_gc);/* PORT setting on PB1_TWI */ROW1_set_dir(// <y> Pin direction// <id> pad_dir// <PORT_DIR_OFF"> Off// <PORT_DIR_IN"> In// <PORT_DIR_OUT"> OutPORT_DIR_OUT);ROW1_set_level(// <y> Initial level// <id> pad_initial_level// <false"> Low// <true"> Highfalse);ROW1_set_pull_mode(// <y> Pull configuration// <id> pad_pull_config// <PORT_PULL_OFF"> Off// <PORT_PULL_UP"> Pull-upPORT_PULL_UP);ROW1_set_inverted(// <y> Invert I/O on pin// <id> pad_invert// <false"> Not inverted// <true"> Invertedfalse);ROW1_set_isc(// <y> Pin Input/Sense Configuration// <id> pad_isc// <PORT_ISC_INTDISABLE_gc"> Interrupt disabled but input buffer enabled// <PORT_ISC_BOTHEDGES_gc"> Sense Both Edges// <PORT_ISC_RISING_gc"> Sense Rising Edge// <PORT_ISC_FALLING_gc"> Sense Falling Edge// <PORT_ISC_INPUT_DISABLE_gc"> Digital Input Buffer disabled// <PORT_ISC_LEVEL_gc"> Sense low LevelPORT_ISC_INTDISABLE_gc);/* PORT setting on PC0 */COLUMN1_set_dir(// <y> Pin direction// <id> pad_dir// <PORT_DIR_OFF"> Off// <PORT_DIR_IN"> In// <PORT_DIR_OUT"> OutPORT_DIR_IN);COLUMN1_set_level(// <y> Initial level// <id> pad_initial_level// <false"> Low// <true"> Highfalse);COLUMN1_set_pull_mode(// <y> Pull configuration// <id> pad_pull_config// <PORT_PULL_OFF"> Off// <PORT_PULL_UP"> Pull-upPORT_PULL_UP);COLUMN1_set_inverted(// <y> Invert I/O on pin// <id> pad_invert// <false"> Not inverted// <true"> Invertedfalse);COLUMN1_set_isc(// <y> Pin Input/Sense Configuration// <id> pad_isc// <PORT_ISC_INTDISABLE_gc"> Interrupt disabled but input buffer enabled// <PORT_ISC_BOTHEDGES_gc"> Sense Both Edges// <PORT_ISC_RISING_gc"> Sense Rising Edge// <PORT_ISC_FALLING_gc"> Sense Falling Edge// <PORT_ISC_INPUT_DISABLE_gc"> Digital Input Buffer disabled// <PORT_ISC_LEVEL_gc"> Sense low LevelPORT_ISC_BOTHEDGES_gc);/* PORT setting on PC1 */COLUMN2_set_dir(// <y> Pin direction// <id> pad_dir// <PORT_DIR_OFF"> Off// <PORT_DIR_IN"> In// <PORT_DIR_OUT"> OutPORT_DIR_IN);COLUMN2_set_level(// <y> Initial level// <id> pad_initial_level// <false"> Low// <true"> Highfalse);COLUMN2_set_pull_mode(// <y> Pull configuration// <id> pad_pull_config// <PORT_PULL_OFF"> Off// <PORT_PULL_UP"> Pull-upPORT_PULL_UP);COLUMN2_set_inverted(// <y> Invert I/O on pin// <id> pad_invert// <false"> Not inverted// <true"> Invertedfalse);COLUMN2_set_isc(// <y> Pin Input/Sense Configuration// <id> pad_isc// <PORT_ISC_INTDISABLE_gc"> Interrupt disabled but input buffer enabled// <PORT_ISC_BOTHEDGES_gc"> Sense Both Edges// <PORT_ISC_RISING_gc"> Sense Rising Edge// <PORT_ISC_FALLING_gc"> Sense Falling Edge// <PORT_ISC_INPUT_DISABLE_gc"> Digital Input Buffer disabled// <PORT_ISC_LEVEL_gc"> Sense low LevelPORT_ISC_BOTHEDGES_gc);/* PORT setting on PC2 */COLUMN3_set_dir(// <y> Pin direction// <id> pad_dir// <PORT_DIR_OFF"> Off// <PORT_DIR_IN"> In// <PORT_DIR_OUT"> OutPORT_DIR_IN);COLUMN3_set_level(// <y> Initial level// <id> pad_initial_level// <false"> Low// <true"> Highfalse);COLUMN3_set_pull_mode(// <y> Pull configuration// <id> pad_pull_config// <PORT_PULL_OFF"> Off// <PORT_PULL_UP"> Pull-upPORT_PULL_UP);COLUMN3_set_inverted(// <y> Invert I/O on pin// <id> pad_invert// <false"> Not inverted// <true"> Invertedfalse);COLUMN3_set_isc(// <y> Pin Input/Sense Configuration// <id> pad_isc// <PORT_ISC_INTDISABLE_gc"> Interrupt disabled but input buffer enabled// <PORT_ISC_BOTHEDGES_gc"> Sense Both Edges// <PORT_ISC_RISING_gc"> Sense Rising Edge// <PORT_ISC_FALLING_gc"> Sense Falling Edge// <PORT_ISC_INPUT_DISABLE_gc"> Digital Input Buffer disabled// <PORT_ISC_LEVEL_gc"> Sense low LevelPORT_ISC_BOTHEDGES_gc);/* PORT setting on PC3 */COLUMN0_set_dir(// <y> Pin direction// <id> pad_dir// <PORT_DIR_OFF"> Off// <PORT_DIR_IN"> In// <PORT_DIR_OUT"> OutPORT_DIR_IN);COLUMN0_set_level(// <y> Initial level// <id> pad_initial_level// <false"> Low// <true"> Highfalse);COLUMN0_set_pull_mode(// <y> Pull configuration// <id> pad_pull_config// <PORT_PULL_OFF"> Off// <PORT_PULL_UP"> Pull-upPORT_PULL_UP);COLUMN0_set_inverted(// <y> Invert I/O on pin// <id> pad_invert// <false"> Not inverted// <true"> Invertedfalse);COLUMN0_set_isc(// <y> Pin Input/Sense Configuration// <id> pad_isc// <PORT_ISC_INTDISABLE_gc"> Interrupt disabled but input buffer enabled// <PORT_ISC_BOTHEDGES_gc"> Sense Both Edges// <PORT_ISC_RISING_gc"> Sense Rising Edge// <PORT_ISC_FALLING_gc"> Sense Falling Edge// <PORT_ISC_INPUT_DISABLE_gc"> Digital Input Buffer disabled// <PORT_ISC_LEVEL_gc"> Sense low LevelPORT_ISC_BOTHEDGES_gc);CLKCTRL_init();RTC_0_init();CPUINT_init();SLPCTRL_init();BOD_init();}
123version https://git-lfs.github.com/spec/v1oid sha256:77fd5a2a6b6444f8e01b9b27b7acd1b877b6a558f67c7cb9228dc655975d3588size 33441234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495/*** \file** \brief Configuration Change Protection*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**//*** \defgroup doc_driver_system_protected_io Protected IO* \ingroup doc_driver_system** \section doc_driver_protected_io_rev Revision History* - v0.0.0.1 Initial Commit**@{*/#include <assembler.h>/** GNU and IAR use different calling conventions. Since this is* a very small and simple function to begin with, it's easier* to implement it twice than to deal with the differences* within a single implementation.*/PUBLIC_FUNCTION(protected_write_io)#if defined(__GNUC__)#ifdef RAMPZout _SFR_IO_ADDR(RAMPZ), r1 // Clear bits 23:16 of Z#endifmovw r30, r24 // Load addr into Zout CCP, r22 // Start CCP handshakest Z, r20 // Write value to I/O registerret // Return to caller#elif defined(__IAR_SYSTEMS_ASM__)# if !defined(CONFIG_MEMORY_MODEL_TINY) && !defined(CONFIG_MEMORY_MODEL_SMALL) \&& !defined(CONFIG_MEMORY_MODEL_LARGE)# define CONFIG_MEMORY_MODEL_SMALL# endif# if defined(CONFIG_MEMORY_MODEL_LARGE)ldi r20, 0out RAMPZ, r20 // Reset bits 23:16 of Zmovw r30, r16 // Load addr into Z# elif defined(CONFIG_MEMORY_MODEL_TINY)ldi r31, 0 // Reset bits 8:15 of Zmov r30, r16 // Load addr into Z# elsemovw r30, r16 // Load addr into Z# endif# if defined(CONFIG_MEMORY_MODEL_TINY)out CCP, r17 // Start CCP handshakest Z, r18 // Write value to I/O register# elif defined(CONFIG_MEMORY_MODEL_SMALL)out CCP, r18 // Start CCP handshakest Z, r19 // Write value to I/O register# elif defined(CONFIG_MEMORY_MODEL_LARGE)out CCP, r19 // Start CCP handshakest Z, r20 // Write value to I/O register# else# error Unknown memory model in use, no idea how registers should be accessed# endifret#else# error Unknown assembler#endifEND_FUNC(protected_write_io)END_FILE()
123version https://git-lfs.github.com/spec/v1oid sha256:8558232ce56de18983c13d7bb958856a1952a969d125d3b2c7fa970c2407f26dsize 25881234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677/*** \file** \brief RTC related functionality implementation.*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**//*** \defgroup doc_driver_rtc_init RTC Init Driver* \ingroup doc_driver_rtc** \section doc_driver_rtc_rev Revision History* - v0.0.0.1 Initial Commit**@{*/#include <rtc.h>/*** \brief Initialize rtc interface* \return Initialization status.*/int8_t RTC_0_init(){while (RTC.STATUS > 0) { /* Wait for all register to be synchronized */}// RTC.CMP = 0x0; /* Compare: 0x0 */// RTC.CNT = 0x0; /* Counter: 0x0 */RTC.CTRLA = RTC_PRESCALER_DIV1_gc /* 1 */| 1 << RTC_RTCEN_bp /* Enable: enabled */| 0 << RTC_RUNSTDBY_bp; /* Run In Standby: disabled */// RTC.PER = 0xffff; /* Period: 0xffff */// RTC.CLKSEL = RTC_CLKSEL_INT32K_gc; /* 32KHz Internal Ultra Low Power Oscillator (OSCULP32K) */// RTC.DBGCTRL = 0 << RTC_DBGRUN_bp; /* Run in debug: disabled */// RTC.INTCTRL = 0 << RTC_CMP_bp /* Compare Match Interrupt enable: disabled */// | 0 << RTC_OVF_bp; /* Overflow Interrupt enable: disabled */while (RTC.PITSTATUS > 0) { /* Wait for all register to be synchronized */}RTC.PITCTRLA = RTC_PERIOD_CYC32_gc /* RTC Clock Cycles 32 */| 1 << RTC_PITEN_bp; /* Enable: enabled */// RTC.PITDBGCTRL = 0 << RTC_DBGRUN_bp; /* Run in debug: disabled */// RTC.PITINTCTRL = 0 << RTC_PI_bp; /* Periodic Interrupt: disabled */return 0;}
123version https://git-lfs.github.com/spec/v1oid sha256:857fccb0b7864496e75bac5163a27e5d0e644f0aab1043d90f48d4546fb6fd16size 18631234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556/*** \file** \brief SLPCTRL related functionality implementation.*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms,you may use this software andany derivatives exclusively with Microchip products.It is your responsibilityto comply with third party license terms applicable to your use of third partysoftware (including open source software) that may accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR APARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HASBEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THEFULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS INANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.**//*** \defgroup doc_driver_system_slpctrl Sleep Controller* \ingroup doc_driver_system** \section doc_driver_slpctrl_rev Revision History* - v0.0.0.1 Initial Commit**@{*/#include <slpctrl.h>/*** \brief Initialize Sleep Controller** \return Initialization status.*/int8_t SLPCTRL_init(){SLPCTRL.CTRLA = 0 << SLPCTRL_SEN_bp /* Sleep enable: disabled */| SLPCTRL_SMODE_PDOWN_gc; /* Power-down Mode */return 0;}void SLPCTRL_set_sleep_mode(SLPCTRL_SMODE_t setmode){SLPCTRL.CTRLA = (SLPCTRL.CTRLA & ~SLPCTRL_SMODE_gm) | (setmode & SLPCTRL_SMODE_gm);}
123version https://git-lfs.github.com/spec/v1oid sha256:80fc8866c630ebe0b1249eaa221f7348903a9dfe6771fe1be728a7b698b7a01csize 219212345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061/*** \file assembler.h** \brief Assembler abstraction layer and utilities*** Copyright (C) 2016 Atmel Corporation. All rights reserved.** \asf_license_start** \page License** Redistribution and use in source and binary forms, with or without* modification, are permitted provided that the following conditions are met:** 1. Redistributions of source code must retain the above copyright notice,* this list of conditions and the following disclaimer.** 2. Redistributions in binary form must reproduce the above copyright notice,* this list of conditions and the following disclaimer in the documentation* and/or other materials provided with the distribution.** 3. The name of Atmel may not be used to endorse or promote products derived* from this software without specific prior written permission.** 4. This software may only be redistributed and used in connection with an* Atmel microcontroller product.** THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE* POSSIBILITY OF SUCH DAMAGE.** \asf_license_stop***/#ifndef ASSEMBLER_H_INCLUDED#define ASSEMBLER_H_INCLUDED#if !defined(__ASSEMBLER__) && !defined(__IAR_SYSTEMS_ASM__) && !defined(__DOXYGEN__)#error This file may only be included from assembly files#endif#if defined(__ASSEMBLER__)#include "assembler/gas.h"#include <avr/io.h>#elif defined(__IAR_SYSTEMS_ASM__)#include "assembler/iar.h"#include <ioavr.h>#endif#endif /* ASSEMBLER_H_INCLUDED */
123version https://git-lfs.github.com/spec/v1oid sha256:aa44b0f9bf65b51a78589c41506205c2dec595d0e591a7a0464868e1b937d500size 4391123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127/*** \file gas.h** \brief Assembler abstraction layer: GNU Assembler specifics*** Copyright (C) 2016 Atmel Corporation. All rights reserved.** \asf_license_start** \page License** Redistribution and use in source and binary forms, with or without* modification, are permitted provided that the following conditions are met:** 1. Redistributions of source code must retain the above copyright notice,* this list of conditions and the following disclaimer.** 2. Redistributions in binary form must reproduce the above copyright notice,* this list of conditions and the following disclaimer in the documentation* and/or other materials provided with the distribution.** 3. The name of Atmel may not be used to endorse or promote products derived* from this software without specific prior written permission.** 4. This software may only be redistributed and used in connection with an* Atmel microcontroller product.** THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE* POSSIBILITY OF SUCH DAMAGE.** \asf_license_stop***/#ifndef ASSEMBLER_GAS_H_INCLUDED#define ASSEMBLER_GAS_H_INCLUDED#ifndef __DOXYGEN__/* clang-format off *//* IAR doesn't accept dots in macro names */.macro ld_addr, reg, symlda.w \reg, \sym.endm/* Define a function \a name that is either globally visible or only* file-local.*/.macro gas_begin_func name, is_public.if \is_public.global \name.endif.section .text.\name, "ax", @progbits.type \name, @function\name :.endm/* Define a function \a name that is either globally visible or only* file-local in a given segment.*/.macro gas_begin_func_segm name, is_public, segment.if \is_public.global \name.endif.section .\segment, "ax", @progbits.type \name, @function\name :.endm/* Define \a name as a weak alias for the function \a strong_name */.macro gas_weak_function_alias name, strong_name.global \name.weak \name.type \name, @function.set \name, \strong_name.endm/* Define a weak function called \a name */.macro gas_weak_function name.weak \namegas_begin_func \name 1.endm#define REPEAT(count) .rept count#define END_REPEAT() .endr#define FILL_BYTES(count) .fill count#define SET_LOC(offset) .org offset#define L(name) .L##name#define EXTERN_SYMBOL(name)#define TEXT_SECTION(name) \.section name, "ax", @progbits#define RODATA_SECTION(name) \.section name, "a", @progbits#define DATA_SECTION(name) \.section name, "aw", @progbits#define BSS_SECTION(name) \.section name, "aw", @nobits#define FUNCTION(name) gas_begin_func name 0#define PUBLIC_FUNCTION(name) gas_begin_func name 1#define PUBLIC_FUNCTION_SEGMENT(name, segment) \gas_begin_func_segm name 1 segment#define WEAK_FUNCTION(name) gas_weak_function name#define WEAK_FUNCTION_ALIAS(name, strong_name) \gas_weak_function_alias name strong_name#define END_FUNC(name) \.size name, . - name#define END_FILE()/* clang-format on */#endif /* __DOXYGEN__ */#endif /* ASSEMBLER_GAS_H_INCLUDED */
123version https://git-lfs.github.com/spec/v1oid sha256:e22cb5d7f1738d07a75a0502f97e7ba3818ff51a19453d6db67e396dbfc273a8size 3581123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116/*** \file iar.h** \brief Assembler abstraction layer: IAR Assembler specifics*** Copyright (C) 2016 Atmel Corporation. All rights reserved.** \asf_license_start** \page License** Redistribution and use in source and binary forms, with or without* modification, are permitted provided that the following conditions are met:** 1. Redistributions of source code must retain the above copyright notice,* this list of conditions and the following disclaimer.** 2. Redistributions in binary form must reproduce the above copyright notice,* this list of conditions and the following disclaimer in the documentation* and/or other materials provided with the distribution.** 3. The name of Atmel may not be used to endorse or promote products derived* from this software without specific prior written permission.** 4. This software may only be redistributed and used in connection with an* Atmel microcontroller product.** THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE* POSSIBILITY OF SUCH DAMAGE.** \asf_license_stop***/#ifndef ASSEMBLER_IAR_H_INCLUDED#define ASSEMBLER_IAR_H_INCLUDED/* clang-format off */ld_addr MACRO reg, symmov reg, LWRD symorh reg, HWRD symENDMcall MACRO symrcall symENDMiar_begin_func MACRO name, sect, is_public, is_weakMODULE nameRSEG CODE:CODE:NOROOT(1)IF is_weak == 1PUBWEAK nameELSEIF is_publicPUBLIC nameENDIFname:ENDMiar_begin_func_segm MACRO name, sect, is_public, is_weak, segmentMODULE nameRSEG segment:CODE:NOROOT(1)IF is_weak == 1PUBWEAK nameELSEIF is_publicPUBLIC nameENDIFname:ENDMiar_weak_alias MACRO name, strong_namePUBWEAK namename:rjmp strong_nameENDM#define lo(x) LWRD x#define hi(x) HWRD x#define REPEAT(count) REPT count#define END_REPEAT() ENDR#define SET_LOC(offset) ORG offset#define END_FILE() END#define FILL_BYTES(count) DS8 count#define L(name) name#define EXTERN_SYMBOL(name) EXTERN name#define FUNCTION(name) iar_begin_func name, text_##name, 0, 0#define PUBLIC_FUNCTION(name) iar_begin_func name, text_##name, 1, 0#define PUBLIC_FUNCTION_SEGMENT(name, segment) \iar_begin_func_segm name, text_##name, 1, 0, segment#define WEAK_FUNCTION(name) iar_begin_func name, text_##name, 1, 1#define WEAK_FUNCTION_ALIAS(name, strong_name) \iar_weak_alias name, strong_name#define END_FUNC(name) ENDMOD#define TEXT_SECTION(name) RSEG name:CODE:NOROOT#define RODATA_SECTION(name) RSEG name:CONST:NOROOT#define DATA_SECTION(name) RSEG name:DATA:NOROOT#define BSS_SECTION(name) RSEG name:DATA:NOROOT/* clang-format on */#endif /* ASSEMBLER_IAR_H_INCLUDED */
123version https://git-lfs.github.com/spec/v1oid sha256:eddf10c57aba1402783484b51c3aa476484c61707495878f3e879b4323d9629dsize 4456123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125/*** \file atomic.h** \brief Macros used for atomic memory access.*** Copyright (C) 2016 Atmel Corporation. All rights reserved.** \asf_license_start** \page License** Redistribution and use in source and binary forms, with or without* modification, are permitted provided that the following conditions are met:** 1. Redistributions of source code must retain the above copyright notice,* this list of conditions and the following disclaimer.** 2. Redistributions in binary form must reproduce the above copyright notice,* this list of conditions and the following disclaimer in the documentation* and/or other materials provided with the distribution.** 3. The name of Atmel may not be used to endorse or promote products derived* from this software without specific prior written permission.** 4. This software may only be redistributed and used in connection with an* Atmel microcontroller product.** THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE* POSSIBILITY OF SUCH DAMAGE.** \asf_license_stop***/#ifndef ATOMIC_H#define ATOMIC_H/*** \defgroup doc_driver_utils_atomic Atomic memory access and critical sections* \ingroup doc_driver_utils** Atomic memory access and critical sections** \{*//* clang-format off */#if defined(__GNUC__) || defined (__DOXYGEN__)/*** \brief Enter a critical region** Saves the contents of the status register, including the Global* Interrupt Enable bit, so that it can be restored upon leaving the* critical region. Thereafter, clears the Global Interrupt Enable Bit.* This macro takes a parameter P that is unused for the GCC compiler,* but necessary for code compatibility with the IAR compiler. The IAR* compiler declares a variable with the name of the parameter for* holding the SREG value. Since a variable is declared in the macro,* this variable must have a name that is unique within the scope* that the critical region is declared within, otherwise compilation* will fail.** \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG**/#define ENTER_CRITICAL(UNUSED) __asm__ __volatile__ ( \"in __tmp_reg__, __SREG__" "\n\t" \"cli" "\n\t" \"push __tmp_reg__" "\n\t" \::: "memory" \)/*** \brief Exit a critical region** Restores the contents of the status register, including the Global* Interrupt Enable bit, as it was when entering the critical region.* This macro takes a parameter P that is unused for the GCC compiler,* but necessary for code compatibility with the IAR compiler. The IAR* compiler uses this parameter as the name of a variable that holds* the SREG value. The parameter must be identical to the parameter* used in the corresponding ENTER_CRITICAL().** \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG**/#define EXIT_CRITICAL(UNUSED) __asm__ __volatile__ ( \"pop __tmp_reg__" "\n\t" \"out __SREG__, __tmp_reg__" "\n\t" \::: "memory" \)#define DISABLE_INTERRUPTS() __asm__ __volatile__ ( "cli" ::: "memory")#define ENABLE_INTERRUPTS() __asm__ __volatile__ ( "sei" ::: "memory")#elif defined(__ICCAVR__)#define ENTER_CRITICAL(P) unsigned char P = __save_interrupt();__disable_interrupt();#define EXIT_CRITICAL(P) __restore_interrupt(P);#define DISABLE_INTERRUPTS() __disable_interrupt();#define ENABLE_INTERRUPTS() __enable_interrupt();#else# error Unsupported compiler.#endif/* clang-format on */#endif /* ATOMIC_H */
123version https://git-lfs.github.com/spec/v1oid sha256:e0f4d171160c6a6a3e5cc746365e2151cee5500d2b8ae666bd983fffa32003f3size 27401234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192/*** \file compiler.h** \brief Commonly used includes, types and macros.*** Copyright (C) 2016 Atmel Corporation. All rights reserved.** \asf_license_start** \page License** Redistribution and use in source and binary forms, with or without* modification, are permitted provided that the following conditions are met:** 1. Redistributions of source code must retain the above copyright notice,* this list of conditions and the following disclaimer.** 2. Redistributions in binary form must reproduce the above copyright notice,* this list of conditions and the following disclaimer in the documentation* and/or other materials provided with the distribution.** 3. The name of Atmel may not be used to endorse or promote products derived* from this software without specific prior written permission.** 4. This software may only be redistributed and used in connection with an* Atmel microcontroller product.** THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE* POSSIBILITY OF SUCH DAMAGE.** \asf_license_stop***/#ifndef UTILS_COMPILER_H#define UTILS_COMPILER_H/*** \defgroup doc_driver_utils_compiler Compiler abstraction* \ingroup doc_driver_utils** Compiler abstraction layer and code utilities for 8-bit AVR.* This module provides various abstraction layers and utilities* to make code compatible between different compilers.** \{*/#if defined(__GNUC__)#include <avr/io.h>#include <avr/builtins.h>#elif defined(__ICCAVR__)#define ENABLE_BIT_DEFINITIONS 1#include <ioavr.h>#include <intrinsics.h>#ifndef CCP_IOREG_gc#define CCP_IOREG_gc 0xD8 /* CPU_CCP_IOREG_gc */#endif#ifndef CCP_SPM_gc#define CCP_SPM_gc 0x9D /* CPU_CCP_SPM_gc */#endif#else#error Unsupported compiler.#endif#include <stdbool.h>#include <stdint.h>#include <stddef.h>#include <stdlib.h>#include <interrupt_avr8.h>/*** \def UNUSED* \brief Marking \a v as a unused parameter or value.*/#define UNUSED(v) (void)(v)#endif /* UTILS_COMPILER_H */
123version https://git-lfs.github.com/spec/v1oid sha256:c0e8a2cf54e6250736cd562e5d0640b95f239c0aeb6dad2bec264c97e6f13609size 3064123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111/*** \file interrupt_avr8.h** \brief Global interrupt management for 8-bit AVR*** Copyright (C) 2016 Atmel Corporation. All rights reserved.** \asf_license_start** \page License** Redistribution and use in source and binary forms, with or without* modification, are permitted provided that the following conditions are met:** 1. Redistributions of source code must retain the above copyright notice,* this list of conditions and the following disclaimer.** 2. Redistributions in binary form must reproduce the above copyright notice,* this list of conditions and the following disclaimer in the documentation* and/or other materials provided with the distribution.** 3. The name of Atmel may not be used to endorse or promote products derived* from this software without specific prior written permission.** 4. This software may only be redistributed and used in connection with an* Atmel microcontroller product.** THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE* POSSIBILITY OF SUCH DAMAGE.** \asf_license_stop**//*** \defgroup doc_driver_utils_interrupts ISR abstraction* \ingroup doc_driver_utils** Interrupt-related functionality.** \{*/#ifndef UTILS_INTERRUPT_AVR8_H#define UTILS_INTERRUPT_AVR8_H/*** \weakgroup interrupt_group** @{*/#ifdef ISR_CUSTOM_H#include ISR_CUSTOM_H#else/*** \def ISR* \brief Define service routine for specified interrupt vector** Usage:* \codeISR(FOO_vect){...}\endcode** \param vect Interrupt vector name as found in the device header files.*/#if defined(__DOXYGEN__)#define ISR(vect)#elif defined(__GNUC__)#include <avr/interrupt.h>#elif defined(__ICCAVR__)#define __ISR(x) _Pragma(#x)#define ISR(vect) __ISR(vector = vect) __interrupt void handler_##vect(void)#endif#endif // ISR_CUSTOM_H#ifdef __GNUC__#define cpu_irq_enable() sei()#define cpu_irq_disable() cli()#else#define cpu_irq_enable() __enable_interrupt()#define cpu_irq_disable() __disable_interrupt()#endif//! @}/*** \weakgroup interrupt_deprecated_group* @{*/// Deprecated definitions.#define Enable_global_interrupt() cpu_irq_enable()#define Disable_global_interrupt() cpu_irq_disable()#define Is_global_interrupt_enabled() cpu_irq_is_enabled()//! @}#endif /* UTILS_INTERRUPT_AVR8_H */
123version https://git-lfs.github.com/spec/v1oid sha256:1db4b218199c008eef101c66264db5a8677d9df5ef0f68040d0ec430b56412d3size 226312345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273/*** \file utils.h** \brief Different macros.*** Copyright (C) 2016 Atmel Corporation. All rights reserved.** \asf_license_start** \page License** Redistribution and use in source and binary forms, with or without* modification, are permitted provided that the following conditions are met:** 1. Redistributions of source code must retain the above copyright notice,* this list of conditions and the following disclaimer.** 2. Redistributions in binary form must reproduce the above copyright notice,* this list of conditions and the following disclaimer in the documentation* and/or other materials provided with the distribution.** 3. The name of Atmel may not be used to endorse or promote products derived* from this software without specific prior written permission.** 4. This software may only be redistributed and used in connection with an* Atmel microcontroller product.** THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE* POSSIBILITY OF SUCH DAMAGE.** \asf_license_stop***//*** \defgroup doc_driver_utils AVR Code utility functions** Compiler abstraction layer and code utilities for AVR.* This module provides various abstraction layers and utilities* to make code compatible between different compilers.** \{*/#ifndef UTILS_H_INCLUDED#define UTILS_H_INCLUDED#ifdef __cplusplusextern "C" {#endif/*** \brief Retrieve array size*/#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))/** @} */#ifdef __cplusplus}#endif#endif /* UTILS_H_INCLUDED */
123version https://git-lfs.github.com/spec/v1oid sha256:d563d4f547cec126342f7c692d0ffd8a7de10b1b7d35d9ee6f4f60517eec54absize 2751123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384/*** \file utils_assert.h** \brief Asserts related functionality.*** Copyright (C) 2016 Atmel Corporation. All rights reserved.** \asf_license_start** \page License** Redistribution and use in source and binary forms, with or without* modification, are permitted provided that the following conditions are met:** 1. Redistributions of source code must retain the above copyright notice,* this list of conditions and the following disclaimer.** 2. Redistributions in binary form must reproduce the above copyright notice,* this list of conditions and the following disclaimer in the documentation* and/or other materials provided with the distribution.** 3. The name of Atmel may not be used to endorse or promote products derived* from this software without specific prior written permission.** 4. This software may only be redistributed and used in connection with an* Atmel microcontroller product.** THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE* POSSIBILITY OF SUCH DAMAGE.** \asf_license_stop***//*** \defgroup doc_driver_utils_assert Functionality for assert.* \ingroup doc_driver_utils** \{*/#ifndef _ASSERT_H_INCLUDED#define _ASSERT_H_INCLUDED#ifdef __cplusplusextern "C" {#endif#include <stdbool.h>/*** \brief Assert macro** This macro is used to throw asserts. It can be mapped to different function* based on debug level.** \param[in] condition A condition to be checked;* assert is thrown if the given condition is false*/#ifdef DEBUG#define ASSERT(condition) \if (!(condition)) \while (true) \;#else#define ASSERT(condition) ((void)0)#endif#ifdef __cplusplus}#endif#endif /* _ASSERT_H_INCLUDED */
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/ccp.h+76-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/clkctrl.h+43-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/cpuint.h+43-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/driver_init.h+62-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/port.h+718-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/protected_io.h+83-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/rstctrl.h+68-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/rtc.h+44-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/slpctrl.h+45-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/system.h+72-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/main.c+258-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/project.elf.asm+1-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/bod.c+56-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/clkctrl.c+65-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/cpuint.c+62-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/driver_init.c+415-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/protected_io.S+95-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/rtc.c+77-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/slpctrl.c+56-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler.h+61-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler/gas.h+127-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler/iar.h+116-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/atomic.h+125-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/compiler.h+92-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/interrupt_avr8.h+111-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/utils.h+73-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/utils_assert.h+84-3
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR182/AVR182.pdf
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR182/Zero Cross Detector.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR241/AVR241.pdf
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR241/LCD Driver.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Anode LED/Arduino & RGB Common Anode LED ShiftPWM.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Cathode LED/Arduino & RGB Common Cathode LED Rainbow.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Cathode LED/Arduino & RGB Common Cathode LED.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 16 Channel Pwm Shield/Arduino 16 Channel Pwm Shield - PWM test.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 16 Channel Pwm Shield/Arduino 16 Channel Pwm Shield - Servo test.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 168 DDS generator/Arduino 168 DDS generator.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 4 channel Relay/Arduino 4 channel Relay.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 7-segment using 74HC595 Shift Register/Arduino 7-segment & terminal using 74HC595 Shift Register.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 7-segment using 74HC595 Shift Register/Arduino 7-segment using 74HC595 Shift Register.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 74HC595 Shift Register/Arduino 74HC595 Shift Register.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino AD8495 K-Type Thermocouple Amplifier/Arduino AD8495 K-Type Thermocouple Amplfier.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino BME280 Adafruit/Adafruit_BME280_SPI.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino BMP180 Adafruit/bmp180_test.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Cyrillic LCD/Arduino Cyrillic LCD.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Cyrillic LCD/cyrillic.bmp


Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DHT22 Humidity & Temperature sensor/Arduino DHT22 Humidity & Temperature sensor.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS1302 RTC/Arduino DS1302 RTC.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS18B20 OneWire/Arduino DS18B20 OneWire.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS2408 Port Expander Switch/Arduino DS2408 Port Expander Switch.pdsprj