Logo Search packages:      
Sourcecode: odyssey version File versions

uint32_t PicDevice::read_prog_data ( void   )  [protected, virtual]

Send the READ_PROG_DATA command and read in the program data at the address specified by program counter.

Returns:
The program data at the current PIC address.

Definition at line 177 of file PicDevice.cxx.

References COMMAND_READ_PROG_DATA, Device::io, IO::shift_bits_in(), IO::usleep(), wordmask, and write_command().

Referenced by Pic16Device::erase(), program_cycle(), Pic16Device::read(), Pic16Device::read_config_word(), Pic16Device::read_id_memory(), Pic16Device::read_program_memory(), Pic16f87xADevice::write_config_word(), Pic16Device::write_id_memory(), and Pic16Device::write_program_memory().

                                       {
      uint32_t data;

      this->write_command(COMMAND_READ_PROG_DATA);
      data = this->io->shift_bits_in(16, 1);
      this->io->usleep(1);
      return (data >> 1) & this->wordmask;
}


Generated by  Doxygen 1.6.0   Back to index