4 This defines a sample for a very simple "peripheral"
5 that can talk to an AVR core.
6 It is in fact a bit more involved than strictly necessary,
7 but is made to demonstrante a few useful features that are
10 Copyright 2008, 2009 Michel Pollet <buserror@gmail.com>
12 This file is part of simavr.
14 simavr is free software: you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
19 simavr is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with simavr. If not, see <http://www.gnu.org/licenses/>.
38 typedef struct button_t {
39 avr_irq_t * irq; // output irq
44 void button_init(struct avr_t * avr, button_t * b);
46 void button_press(button_t * b, uint32_t duration_usec);
47 #endif /* __BUTTON_H__*/