Exemple #1
0
void set_vdd_vpp( PICTYPE pictype, PICFAMILY picfamily, char level )
{
	if( level == 0 )
		exit_ISCP();
	else
		enter_ISCP();
}
Exemple #2
0
char write_data( unsigned long address, unsigned char* data, char blocksize, char lastblock )
{

	
	if( lastblock & BLOCKTYPE_FIRST )
	{
		if(blocksize == 0) return 1; //ok, nothing to write, empty data
		enter_ISCP();
	}
	if( currDevice.write_data )
		currDevice.write_data( address, data, blocksize, lastblock );
	else
	{
		exit_ISCP();
		return 3; //unknown pic type
	}
	if( lastblock & BLOCKTYPE_LAST )
	{
		exit_ISCP();
		return 1; //ok
	}
	else
	{
		return 2; //ask for next block
	}
}
Exemple #3
0
/**
 address points to the first byte of the block
 data contains the data MSB0, LSB0, MSB1, LSB1, etc...
 blocksize is the block syze in BYTES
 */
char write_code( unsigned long address, unsigned char* data, char blocksize, char lastblock )
{

	if( lastblock & BLOCKTYPE_FIRST )
		enter_ISCP();
	if( currDevice.write_code )
		currDevice.write_code( address, data, blocksize, lastblock );
	else
	{
		exit_ISCP();
		return 3;
	}
	if( lastblock & BLOCKTYPE_LAST )
	{
		exit_ISCP();
		return 1; //ok
	}
	else
	{
		return 2; //ask for next block
	}
}