From: "Josu Onandia" <jonandia@aotek.es>
To: <linuxppc-embedded@ozlabs.org>
Subject: RE: Howto set DIO on MPC-5200 Lite
Date: Mon, 19 Mar 2007 14:18:20 +0100 [thread overview]
Message-ID: <918EB199DDDFFA42BEA2EB3A1C6021F360C085@CORREO> (raw)
[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]
Some sample code. Hope this helps.
Regards
Josu Onandia
// PSC2_0 ----> J20 pin 2
// PSC2_1 ----> J20 pin 4
// PSC2_2 ----> J20 pin 6
// PSC2_3 ----> J20 pin 8
//
// GND ---- J20 pins 15,17,19,20
static void psc2_configure_pins(void)
{
struct mpc5xxx_gpio *gpio;
gpio = (struct mpc5xxx_gpio*) MPC5xxx_GPIO;
gpio->port_config &= ~(0x00000070);
gpio->simple_gpioe |= 0x000000F0;
gpio->simple_ode &= ~0x000000F0;
gpio->simple_ddr |= 0x000000F0;
}
/* PSC2 0 to 3 pins */
static inline void psc2_pin_on(int pin)
{
struct mpc5xxx_gpio *gpio;
if((pin < 0) || (pin > 3))
return;
gpio = (struct mpc5xxx_gpio*) MPC5xxx_GPIO;
gpio->simple_dvo |= (1 << (pin + 4));
}
static inline void psc2_pin_off(int pin)
{
struct mpc5xxx_gpio *gpio;
if((pin < 0) || (pin > 3))
return;
gpio = (struct mpc5xxx_gpio*) MPC5xxx_GPIO;
gpio->simple_dvo &= ~ (1 << (pin + 4));
}
-----Mensaje original-----
De: linuxppc-embedded-bounces+jonandia=aotek.es@ozlabs.org en nombre de Matthias Fechner
Enviado el: lun 19/03/2007 8:31
Para: linuxppc-embedded@ozlabs.org
Asunto: Howto set DIO on MPC-5200 Lite
Hi,
how can I set the DIO ports from a MPC-5200 Lite?
Best regards,
Matthias
--
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 3239 bytes --]
next reply other threads:[~2007-03-19 13:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-19 13:18 Josu Onandia [this message]
2007-03-19 18:16 ` Howto set DIO on MPC-5200 Lite Matthias Fechner
2007-03-22 20:04 ` Matthias Fechner
2007-03-22 22:48 ` Steven Kaiser
2007-03-23 12:02 ` Sylvain Munaut
-- strict thread matches above, loose matches on Subject: below --
2007-03-19 7:31 Matthias Fechner
2007-03-19 8:16 ` Sylvain Munaut
2007-03-19 8:45 ` Pedro Luis D. L.
2007-03-19 9:48 ` Matthias Fechner
2007-03-19 10:12 ` Pedro Luis D. L.
2007-03-19 10:14 ` Sylvain Munaut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=918EB199DDDFFA42BEA2EB3A1C6021F360C085@CORREO \
--to=jonandia@aotek.es \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox