aboutsummaryrefslogtreecommitdiffstats
path: root/ports/ARM7-AT91SAM7X
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-02-06 22:07:17 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-02-06 22:07:17 +0000
commitd5f443f74d551831ef4f93c043f70b53d9b1008b (patch)
tree599b517e171ed7258776d3960ac6e3908855a1aa /ports/ARM7-AT91SAM7X
parent35b0454ddb7ac3b9a7b4142c7c04be4570a29798 (diff)
downloadChibiOS-d5f443f74d551831ef4f93c043f70b53d9b1008b.tar.gz
ChibiOS-d5f443f74d551831ef4f93c043f70b53d9b1008b.tar.bz2
ChibiOS-d5f443f74d551831ef4f93c043f70b53d9b1008b.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@732 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports/ARM7-AT91SAM7X')
-rw-r--r--ports/ARM7-AT91SAM7X/sam7x_emac.c2
-rw-r--r--ports/ARM7-AT91SAM7X/sam7x_emac.h2
-rw-r--r--ports/ARM7-AT91SAM7X/sam7x_serial.c30
-rw-r--r--ports/ARM7-AT91SAM7X/sam7x_serial.h8
4 files changed, 21 insertions, 21 deletions
diff --git a/ports/ARM7-AT91SAM7X/sam7x_emac.c b/ports/ARM7-AT91SAM7X/sam7x_emac.c
index 821864fab..b1c0d76b3 100644
--- a/ports/ARM7-AT91SAM7X/sam7x_emac.c
+++ b/ports/ARM7-AT91SAM7X/sam7x_emac.c
@@ -140,7 +140,7 @@ CH_IRQ_HANDLER(EMACIrqHandler) {
/*
* EMAC subsystem initialization.
*/
-void sam7x_emac_init(int prio) {
+void emac_init(int prio) {
int i;
/*
diff --git a/ports/ARM7-AT91SAM7X/sam7x_emac.h b/ports/ARM7-AT91SAM7X/sam7x_emac.h
index cc0512b26..d666ea6ef 100644
--- a/ports/ARM7-AT91SAM7X/sam7x_emac.h
+++ b/ports/ARM7-AT91SAM7X/sam7x_emac.h
@@ -76,7 +76,7 @@ typedef struct {
#ifdef __cplusplus
extern "C" {
#endif
- void sam7x_emac_init(int prio);
+ void emac_init(int prio);
void EMACSetAddress(const uint8_t *eaddr);
bool_t EMACGetLinkStatus(void);
BufDescriptorEntry *EMACGetTransmitBuffer(void);
diff --git a/ports/ARM7-AT91SAM7X/sam7x_serial.c b/ports/ARM7-AT91SAM7X/sam7x_serial.c
index 6b904225a..632270375 100644
--- a/ports/ARM7-AT91SAM7X/sam7x_serial.c
+++ b/ports/ARM7-AT91SAM7X/sam7x_serial.c
@@ -126,14 +126,14 @@ static void OutNotify2(void) {
#endif
/**
- * @brief UART setup.
+ * @brief USART setup.
* @param[in] u pointer to an UART I/O block
* @param[in] speed serial port speed in bits per second
* @param[in] mr the value for the @p MR register
* @note Must be invoked with interrupts disabled.
* @note Does not reset the I/O queues.
*/
-void sam7x_set_usart(AT91PS_USART u, int speed, int mr) {
+void usart_setup(AT91PS_USART u, int speed, int mr) {
/* Disables IRQ sources and stop operations.*/
u->US_IDR = 0xFFFFFFFF;
@@ -162,7 +162,7 @@ void sam7x_set_usart(AT91PS_USART u, int speed, int mr) {
* may have another use, enable them externally if needed.
* RX and TX pads are handled inside.
*/
-void sam7x_serial_init(int prio0, int prio1) {
+void serial_init(int prio0, int prio1) {
#if USE_SAM7X_USART0 || defined(__DOXYGEN__)
/* I/O queue setup.*/
@@ -184,12 +184,12 @@ void sam7x_serial_init(int prio0, int prio1) {
AIC_EnableIT(AT91C_ID_US0);
/* Default parameters.*/
- sam7x_set_usart(AT91C_BASE_US0, SAM7X_USART_BITRATE,
- AT91C_US_USMODE_NORMAL |
- AT91C_US_CLKS_CLOCK |
- AT91C_US_CHRL_8_BITS |
- AT91C_US_PAR_NONE |
- AT91C_US_NBSTOP_1_BIT);
+ usart_setup(AT91C_BASE_US0, DEFAULT_USART_BITRATE,
+ AT91C_US_USMODE_NORMAL |
+ AT91C_US_CLKS_CLOCK |
+ AT91C_US_CHRL_8_BITS |
+ AT91C_US_PAR_NONE |
+ AT91C_US_NBSTOP_1_BIT);
#endif
#if USE_SAM7X_USART1 || defined(__DOXYGEN__)
@@ -212,12 +212,12 @@ void sam7x_serial_init(int prio0, int prio1) {
AIC_EnableIT(AT91C_ID_US1);
/* Default parameters.*/
- sam7x_set_usart(AT91C_BASE_US1, SAM7X_USART_BITRATE,
- AT91C_US_USMODE_NORMAL |
- AT91C_US_CLKS_CLOCK |
- AT91C_US_CHRL_8_BITS |
- AT91C_US_PAR_NONE |
- AT91C_US_NBSTOP_1_BIT);
+ usart_setup(AT91C_BASE_US1, DEFAULT_USART_BITRATE,
+ AT91C_US_USMODE_NORMAL |
+ AT91C_US_CLKS_CLOCK |
+ AT91C_US_CHRL_8_BITS |
+ AT91C_US_PAR_NONE |
+ AT91C_US_NBSTOP_1_BIT);
#endif
}
diff --git a/ports/ARM7-AT91SAM7X/sam7x_serial.h b/ports/ARM7-AT91SAM7X/sam7x_serial.h
index 21db13635..1652ab69f 100644
--- a/ports/ARM7-AT91SAM7X/sam7x_serial.h
+++ b/ports/ARM7-AT91SAM7X/sam7x_serial.h
@@ -44,8 +44,8 @@
* @note It is possible to use @p SetUART() in order to change the working
* parameters at runtime.
*/
-#if !defined(SAM7X_USART_BITRATE) || defined(__DOXYGEN__)
-#define SAM7X_USART_BITRATE 38400
+#if !defined(DEFAULT_USART_BITRATE) || defined(__DOXYGEN__)
+#define DEFAULT_USART_BITRATE 38400
#endif
/**
@@ -69,8 +69,8 @@
#ifdef __cplusplus
extern "C" {
#endif
- void sam7x_serial_init(int prio0, int prio1);
- void sam7x_set_usart(AT91PS_USART u, int speed, int mr);
+ void serial_init(int prio0, int prio1);
+ void usart_setup(AT91PS_USART u, int speed, int mr);
CH_IRQ_HANDLER(UART0IrqHandler);
CH_IRQ_HANDLER(UART1IrqHandler);
#ifdef __cplusplus