avr-libc-dev
[Top][All Lists]
Advanced

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

RE: [avr-libc-dev] Nice to have: XCK Definition


From: Weddington, Eric
Subject: RE: [avr-libc-dev] Nice to have: XCK Definition
Date: Thu, 19 Mar 2009 13:56:30 -0600

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Frédéric Nadeau
> Sent: Monday, March 16, 2009 10:40 AM
> To: address@hidden
> Subject: Re: [avr-libc-dev] Nice to have: XCK Definition
> 
> Hi there,
> 
> Hopes everyone had a great weekend :)

Hi Frédéric,

Sorry to take a while to get back to you.

 
> Now to be more consistent with the way DDR, PORT, are define across
> devices, here is a new sample block:
> 
> #define DDR_SCK DDRB
> #define PORT_SCK PORTB
> #define PIN_SCK PINB
> #define SCK_IDX 7
> 
> In case we want to match the data sheet exactly, here what 
> the datasheet says:
> 
> DDR_SPI = (1<<DD_MOSI)|(1<<DD_SCK);
> 
> Which in our case will become:
> 
> DDR_SPI = (1<<MOSI_IDX)|(1<<SCK_IDX);
> 
> Should we have a definition block like this:
> 
> #define DDR_SCK DDRB
> #define DD_SCK DDB7
> 
> #define PORT_SCK PORTB
> #define P_SCK PB7
> 
> #define PIN_SCK PINB
> #define PINx_SCK PINB7 //No clue for thisone...
> 
> So consider this as interogation number 1.

Any time that we can match the datasheets, or especially the XML files, then 
that is usually a good thing.

It would be interesting to find out if these kinds of examples are in other 
datasheets.


 
> Second point:
> I took the liberty to removed from the pin definition the
> following:(Copy paste from python source code, don't mind the leading
> # as it mark comment in code)
>         # No need for RESET
>         # No need for alim pins, VCC, GND
>         # No need for No Connection pins, NC
>         # No need for ADC alim pins, AVCC, AREF, AGND
>         # No need for JTAG pins, TCK, TMS, TDO, TDI
>         # No need for Timer Oscillator pins, TOSC1, TOSC2
>         # Programming data input/output PDI, PDO
>         # External bus RD,WR,Ax, ADx, ALE
>         # Hardware boot loader pin HWB
> 
> Is there other pin that we do not require pin definition?
> or
> Am I wrong in excluding all these pin(or some of them)?

I think that the criteria would be this: if the firmware can manipulate the pin 
in some way, then we should have a definition for it. If the firmware cannot 
manipulate the pin, then no definition.




reply via email to

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