Logo Search packages:      
Sourcecode: odyssey version File versions

PicDevice Class Reference

#include <PicDevice.h>

Inheritance diagram for PicDevice:

Device Pic16Device Pic18Device Pic12f6xxDevice Pic16f6xxDevice Pic16f7xDevice Pic16f87xADevice Pic16f8xxDevice

List of all members.


Detailed Description

A Device implementation which implements a base class for Microchip's PIC microcontrollers. These microcontrollers are programmed serially and have a word size of 12, 14, or 16 bits. They come in memory configurations of flash or EPROM with some devices having an optional EEPROM dedicated to data storage.

Definition at line 60 of file PicDevice.h.


Public Types

enum  pic_memtype_t { MEMTYPE_EPROM = 0, MEMTYPE_FLASH }

Public Member Functions

virtual void erase (void)=0
IntPairVectorget_mmap (void)
string get_name (void)
int get_wordsize (void)
 PicDevice (char *name)
virtual void program (DataBuffer &buf)=0
virtual void read (DataBuffer &buf, bool verify=false)=0
void set_iodevice (IO *iodev)
void set_progress_cb (bool(*cb)(void *data, long addr, int percent), void *data=NULL)
 ~PicDevice ()

Static Public Member Functions

static vector< string > * list (void)
static void list (vector< string > *v)
static Deviceload (char *name)

Static Public Attributes

static const int COMMAND_BEGIN_PROG = 0x08
static const int COMMAND_END_PROG = 0x0e
static const int COMMAND_ERASE_DATA_MEM = 0x0b
static const int COMMAND_ERASE_PROG_MEM = 0x09
static const int COMMAND_INC_ADDRESS = 0x06
static const int COMMAND_LOAD_CONFIG = 0x00
static const int COMMAND_LOAD_DATA_DATA = 0x03
static const int COMMAND_LOAD_PROG_DATA = 0x02
static const int COMMAND_READ_DATA_DATA = 0x05
static const int COMMAND_READ_PROG_DATA = 0x04

Protected Member Functions

virtual void pic_off (void)
virtual bool program_cycle (uint32_t data, uint32_t mask=0xffffffff)
bool progress (unsigned long addr)
virtual uint32_t read_prog_data (void)
virtual void set_program_mode (void)
virtual void write_command (uint32_t command)
virtual void write_prog_data (uint32_t data)

Protected Attributes

unsigned int codesize
unsigned int eesize
unsigned int erase_time
uint32_t flags
IOio
IntPairVector memmap
pic_memtype_t memtype
string name
unsigned int program_count
unsigned int program_multiplier
unsigned int program_time
bool(* progress_cb )(void *data, long addr, int percent)
void * progress_cb_data
unsigned long progress_count
unsigned long progress_total
uint32_t wordmask
int wordsize

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

Generated by  Doxygen 1.6.0   Back to index