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: Frédéric Nadeau
Subject: Re: [avr-libc-dev] Nice to have: XCK Definition
Date: Mon, 16 Mar 2009 12:40:20 -0400

Hi there,

Hopes everyone had a great weekend :)

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.

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)?

Thanks
Frédéric




reply via email to

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