From: asterix Date: Mon, 22 Oct 2007 12:14:59 +0000 (+0000) Subject: Define strobe pins. X-Git-Tag: 1.0.0~316 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=2f58ecf977cf1e0cf8c86382d61e5148a7174051;p=bertos.git Define strobe pins. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@926 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/app/at91sam7s/hw/hw_ser.h b/app/at91sam7s/hw/hw_ser.h index e69de29b..cccbed13 100644 --- a/app/at91sam7s/hw/hw_ser.h +++ b/app/at91sam7s/hw/hw_ser.h @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Serial hardware-specific definitions + * + * \version $Id$ + * + * \author Daniele Basile + */ + + +#define SER_STROBE_ON do {PIOA_SODR = BV(6);} while(0) +#define SER_STROBE_OFF do {PIOA_CODR = BV(6);} while(0) +#define SER_STROBE_INIT do {\ + /* Set PA6 connected to PIOA */\ + PIOA_PER = BV(6); \ + /* Set PA6 as output */ \ + PIOA_OER = BV(6); \ + /* Disable multidrive on all pins */ \ + PIOA_MDDR = BV(6); \ +} while(0) +