avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] attiny10 with ftdi and bitbang


From: Hannes Weisbach
Subject: Re: [avrdude-dev] attiny10 with ftdi and bitbang
Date: Mon, 9 Jul 2012 17:42:55 +0200

Am 09.07.2012 um 17:17 schrieb Darell Tan:

> On Mon, Jul 9, 2012 at 10:29 PM, Hannes Weisbach
> <address@hidden> wrote:
>> 
>> Am 09.07.2012 um 16:01 schrieb Darell Tan:
>> 
>>> Hi Hannes,
>>> 
>>> Can I ask why you did not simply implement cmd_tpi, chip_erase,
>>> program_enable and initialize functions accordingly?
>> I did and I never said otherwise. I just don't like it, because it causes 
>> much code duplication. Have a look at what bitbang_chip_erase does in the 
>> TPI section and what usbasp_tpi_program_enable does.
> 
> I see, then I misunderstood you because you mentioned you "essentially
> copied the code from usbasp and renamed everything from usbasp to
> avrftdi" which includes usbasp_tpi_read/write_byte,
> usbasp_tpi_paged_read/write as well.
Ok. To clarify:
- I copied tpi_program_enable(), tpi_nvm_waitbusy(), tpi_chip_erase() and 
cmd_tpi(). I renamed them from usbasp_* to avrftdi_* (except cmd_tpi, which I 
got from bitbang.c and I also changed the code a little).
- I've implemented pendants to usbasp_tpi_send_byte() and 
usbasp_tpi_recv_byte() for avrftdi ("physical layer"). In contrast to usbasp I 
do parity check and return error codes (maybe usbasp does it in the firmware - 
at least I believe it is firmware-based).
- As I said in my first email, I only read out the device ID (command line: 
"avrdude -c 4232h -p attiny10") and indeed I have not yet implemented paged 
read/write access (partly because it was late, partly because I couldn't think 
of an elegant way).
Sorry for not being more clearly earlier.
> 
> As for common code, I think there could be a common chip_erase and
> program_enable (like avr_chip_erase or something). It may not be the
> best solution, but it's definitely better than having duplicate code
> in the different programmers.
Maybe a maintainer can comment on that issue?

Regards,
Hannes


reply via email to

[Prev in Thread] Current Thread [Next in Thread]