RSeries astromech firmware
AVRMega2560Programmer Class Reference

#include <flash/AVRMega2560Programmer.h>

Detailed Description

AVR Programmer.

Communicate with the Mega2560 Arduino-stk500v2-bootloader

// Serial port should be operating at 115200 baud
AVRFlasher megaFlasher(MEGA_RESET_PIN, Serial2);
+ Inheritance diagram for AVRMega2560Programmer:
+ Collaboration diagram for AVRMega2560Programmer:

Public Types

enum  MemType {
  kFlash, kEEPROM, kLFuse, kFuse,
  kHFuse, kEFuse, kLock, kCalibration,
  kSignature
}
 
enum  BootLoaderType { kUnknown, kAVRISP }
 
typedef void(* ProgressProc) (double percent)
 

Public Member Functions

 AVRMega2560Programmer (uint8_t resetPin, HardwareSerial &port)
 
virtual void setup () override
 Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor. More...
 
void setProgress (ProgressProc progressFunc)
 
void block ()
 
void release ()
 
void reset ()
 
bool startProgramming ()
 
void stopProgramming ()
 
bool dumpMemory (MemType type)
 
uint8_t * readMemory (MemType type, size_t *size)
 
bool writeHexString (MemType type, const char *hexString, unsigned *lineno=NULL)
 
bool writeMemory (MemType type, bool verify=true)
 
bool hasMemoryChanged (MemType type)
 
- Public Member Functions inherited from SetupEvent
 SetupEvent ()
 Default Constructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SetupEvent
static void ready ()
 Calls setup() for each created AnimatedEvent subclass. More...
 

Member Typedef Documentation

◆ ProgressProc

typedef void(* AVRMega2560Programmer::ProgressProc) (double percent)

Member Enumeration Documentation

◆ BootLoaderType

Enumerator
kUnknown 
kAVRISP 

◆ MemType

Enumerator
kFlash 
kEEPROM 
kLFuse 
kFuse 
kHFuse 
kEFuse 
kLock 
kCalibration 
kSignature 

Constructor & Destructor Documentation

◆ AVRMega2560Programmer()

AVRMega2560Programmer::AVRMega2560Programmer ( uint8_t  resetPin,
HardwareSerial &  port 
)
inline

Member Function Documentation

◆ block()

void AVRMega2560Programmer::block ( )
inline

◆ dumpMemory()

bool AVRMega2560Programmer::dumpMemory ( MemType  type)
inline

◆ hasMemoryChanged()

bool AVRMega2560Programmer::hasMemoryChanged ( MemType  type)
inline

◆ readMemory()

uint8_t* AVRMega2560Programmer::readMemory ( MemType  type,
size_t *  size 
)
inline

◆ release()

void AVRMega2560Programmer::release ( )
inline

◆ reset()

void AVRMega2560Programmer::reset ( )
inline

◆ setProgress()

void AVRMega2560Programmer::setProgress ( ProgressProc  progressFunc)
inline

◆ setup()

virtual void AVRMega2560Programmer::setup ( )
inlineoverridevirtual

Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor.

Implements SetupEvent.

◆ startProgramming()

bool AVRMega2560Programmer::startProgramming ( )
inline

◆ stopProgramming()

void AVRMega2560Programmer::stopProgramming ( )
inline

◆ writeHexString()

bool AVRMega2560Programmer::writeHexString ( MemType  type,
const char *  hexString,
unsigned *  lineno = NULL 
)
inline

◆ writeMemory()

bool AVRMega2560Programmer::writeMemory ( MemType  type,
bool  verify = true 
)
inline

The documentation for this class was generated from the following file: