Files

  • Not Found
  • Invalid object requested. SHA must identify a commit or a tree.
Last update 5 years 4 months
Filescode
..
Config
include
src
utils
EEPROM_ATM328.h
atmel_start.c
atmel_start.h
driver_isr.c
main.c
driver_isr.c
/** * \file * * \brief Driver ISR. * * * 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 * * */ /* * 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 <compiler.h> extern int sec, min, set_time, pause, state, rinse_time,delay; extern int wash_flag; ISR(WDT_vect) { /* Insert your WDT_0 interrupt handler code */ Wash_Pump_set_level(false); Rinse_Pump_set_level(false); Indicator_set_level(false); Bst_Heater_set_level(false); Tank_Heater_set_level(false); Fill_set_level(false); } ISR(TIMER1_COMPA_vect) { /* Insert your TIMER_0 compare channel A interrupt handling code here */ sec++; if(sec>=60) { min++; sec=0; } if(min>=60) { min=0; sec=0; } if (state==1) { Indicator_toggle_level(); } else if(state==2) { Indicator_set_level(true); delay--; if (wash_flag==1) { set_time--; } } else if(state==3) { Indicator_set_level(true); pause--; } else if (state==4) { Indicator_set_level(true); rinse_time--; } }
Report a bug