projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Flashing sled... not yet known to work
[goodfet]
/
firmware
/
include
/
avr.h
diff --git
a/firmware/include/avr.h
b/firmware/include/avr.h
index
f0e8614
..
99e9fbf
100644
(file)
--- a/
firmware/include/avr.h
+++ b/
firmware/include/avr.h
@@
-3,7
+3,14
@@
\brief AVR SPI Programmer
*/
\brief AVR SPI Programmer
*/
+#ifndef AVR_H
+#define AVR_H
+
#include "spi.h"
#include "spi.h"
+#include "app.h"
+
+/* AVR is a known macro for the AVR C includes */
+#define XAVR 0x32
//! Setup the AVR pins.
void avrsetup();
//! Setup the AVR pins.
void avrsetup();
@@
-14,24
+21,24
@@
void avrconnect();
//! Enable AVR programming mode.
void avr_prgen();
//! Read AVR device code.
//! Enable AVR programming mode.
void avr_prgen();
//! Read AVR device code.
-u
8 avr_sig(u8
i);
+u
int8_t avr_sig(uint8_t
i);
//! Erase an AVR device
void avr_erase();
//! Read lock bits.
//! Erase an AVR device
void avr_erase();
//! Read lock bits.
-u
8
avr_lockbits();
+u
int8_t
avr_lockbits();
//! Write lock bits.
//! Write lock bits.
-void avr_setlock(u
8
bits);
+void avr_setlock(u
int8_t
bits);
//! Read a byte of Flash
//! Read a byte of Flash
-u
8 avr_peekflash(u16
adr);
+u
int8_t avr_peekflash(uint16_t
adr);
//! Read a byte of EEPROM.
//! Read a byte of EEPROM.
-u
8 avr_peekeeprom(u16
adr);
+u
int8_t avr_peekeeprom(uint16_t
adr);
//! Read a byte of EEPROM.
//! Read a byte of EEPROM.
-u
8 avr_pokeeeprom(u16 adr, u8
val);
+u
int8_t avr_pokeeeprom(uint16_t adr, uint8_t
val);
//! Is the AVR ready or busy?
//! Is the AVR ready or busy?
-u
8
avr_isready();
+u
int8_t
avr_isready();
//Command codes.
//! Perform a chip erase.
//Command codes.
//! Perform a chip erase.
@@
-57,3
+64,7
@@
u8 avr_isready();
#define AVR_READCAL 0x85
//! Bulk load data
#define AVR_BULKLOAD 0x86
#define AVR_READCAL 0x85
//! Bulk load data
#define AVR_BULKLOAD 0x86
+
+extern app_t const avr_app;
+
+#endif // AVR_H