Code:
/********************************************************************** __file__.c This file is part of the <MyPackage> package Copyright (c) 2003 dinux - dinux@mail.bg 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 **********************************************************************/ /** ATMega128 headers use new scheme: instead of the good old PC0, * we have to use PORTC0.*/ #define bMOTOR_LEFT PORTC0 #define bMOTOR_RIGHT PORTC1 #define MOTOR_DDR DDRC #define MOTOR_PORT PORTC #define MOTOR_PIN PINC #include <inttypes.h> void set_right_motor(uint8_t state); void set_left_motor(uint8_t state);