/* simu.host.c */ /* {{{ * * Copyright (C) 2006 Nicolas Schodet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * Contact : * Web: http://perso.efrei.fr/~schodet/ * Email: * }}} */ #include "common.h" #include "simu.host.h" /** Simulate some AVR regs. */ uint8_t DDRD, PORTD, PORTA, PORTC, PINA; /** Overall counter values. */ uint16_t counter_left, counter_right; /** Counter differences since last update. * Maximum of 9 significant bits, sign included. */ int16_t counter_left_diff, counter_right_diff; /** PWM values, this is an error if absolute value is greater than the * maximum. */ int16_t pwm_left, pwm_right; /** PWM reverse direction, only set pwm dir bits or you will get weird results * on port B. */ uint8_t pwm_dir; /* +AutoDec */ /* -AutoDec */ /** Initialise the timer. */ void timer_init (void) { } /** Wait for timer overflow. */ void timer_wait (void) { } /** Read timer value. Used for performance analysis. */ uint8_t timer_read (void) { return 0; } /** Initialize the counters. */ void counter_init (void) { } /** Update overall counter values and compute diffs. */ void counter_update (void) { } /** Restart counting. */ void counter_restart (void) { } /** Initialise PWM generator. */ void pwm_init (void) { } /** Update the hardware PWM values. */ void pwm_update (void) { }