aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-06-29 16:42:19 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-06-29 16:42:19 +0000
commit852f75dabe8c25a01d6becc6291aa8c26dda0cf5 (patch)
tree200346f39fdefbcfabbeddc0bab2acdb66a347ed /os/hal/ports
parent6711ff45ea5499e2c30dd7b4216b827f263a1f95 (diff)
downloadChibiOS-852f75dabe8c25a01d6becc6291aa8c26dda0cf5.tar.gz
ChibiOS-852f75dabe8c25a01d6becc6291aa8c26dda0cf5.tar.bz2
ChibiOS-852f75dabe8c25a01d6becc6291aa8c26dda0cf5.zip
Fixed bug #512.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6997 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports')
-rw-r--r--os/hal/ports/STM32/LLD/mac_lld.c8
-rw-r--r--os/hal/ports/STM32/LLD/mac_lld.h2
-rw-r--r--os/hal/ports/STM32/STM32F1xx/stm32_dma.c6
3 files changed, 11 insertions, 5 deletions
diff --git a/os/hal/ports/STM32/LLD/mac_lld.c b/os/hal/ports/STM32/LLD/mac_lld.c
index 9f1b5e3db..daddf27b6 100644
--- a/os/hal/ports/STM32/LLD/mac_lld.c
+++ b/os/hal/ports/STM32/LLD/mac_lld.c
@@ -83,8 +83,10 @@ static uint32_t tb[STM32_MAC_TRANSMIT_BUFFERS][BUFFER_SIZE];
* @param[in] macp pointer to the @p MACDriver object
* @param[in] reg register number
* @param[in] value new register value
+ *
+ * @notapi
*/
-static void mii_write(MACDriver *macp, uint32_t reg, uint32_t value) {
+void mii_write(MACDriver *macp, uint32_t reg, uint32_t value) {
ETH->MACMIIDR = value;
ETH->MACMIIAR = macp->phyaddr | (reg << 6) | MACMIIDR_CR |
@@ -100,8 +102,10 @@ static void mii_write(MACDriver *macp, uint32_t reg, uint32_t value) {
* @param[in] reg register number
*
* @return The PHY register content.
+ *
+ * @notapi
*/
-static uint32_t mii_read(MACDriver *macp, uint32_t reg) {
+uint32_t mii_read(MACDriver *macp, uint32_t reg) {
ETH->MACMIIAR = macp->phyaddr | (reg << 6) | MACMIIDR_CR | ETH_MACMIIAR_MB;
while ((ETH->MACMIIAR & ETH_MACMIIAR_MB) != 0)
diff --git a/os/hal/ports/STM32/LLD/mac_lld.h b/os/hal/ports/STM32/LLD/mac_lld.h
index bde7e0345..34b724e07 100644
--- a/os/hal/ports/STM32/LLD/mac_lld.h
+++ b/os/hal/ports/STM32/LLD/mac_lld.h
@@ -328,6 +328,8 @@ extern MACDriver ETHD1;
#ifdef __cplusplus
extern "C" {
#endif
+ void mii_write(MACDriver *macp, uint32_t reg, uint32_t value);
+ uint32_t mii_read(MACDriver *macp, uint32_t reg);
void mac_lld_init(void);
void mac_lld_start(MACDriver *macp);
void mac_lld_stop(MACDriver *macp);
diff --git a/os/hal/ports/STM32/STM32F1xx/stm32_dma.c b/os/hal/ports/STM32/STM32F1xx/stm32_dma.c
index 63e7c0778..4d1428a0f 100644
--- a/os/hal/ports/STM32/STM32F1xx/stm32_dma.c
+++ b/os/hal/ports/STM32/STM32F1xx/stm32_dma.c
@@ -475,7 +475,7 @@ void dmaStreamRelease(const stm32_dma_stream_t *dmastp) {
dma_streams_mask &= ~(1 << dmastp->selfindex);
/* Disables the associated IRQ vector.*/
-#if !(STM32_HAS_DMA2 && !defined(STM32F10X_CL)) || defined(__DOXYGEN__)
+#if !(STM32_HAS_DMA2 && !defined(STM32F10X_CL))
nvicDisableVector(dmastp->vector);
#else
/* Check unless it is 10 or 11 stream. If yes, make additional check before
@@ -483,10 +483,10 @@ void dmaStreamRelease(const stm32_dma_stream_t *dmastp) {
if (dmastp->selfindex < 10)
nvicDisableVector(dmastp->vector);
else {
- if (dma_streams_mask & (3 << 10) == 0)
+ if ((dma_streams_mask & (3 << 10)) == 0)
nvicDisableVector(dmastp->vector);
}
-#endif/* STM32_HAS_DMA2 && !STM32F10X_CL */
+#endif /* STM32_HAS_DMA2 && !STM32F10X_CL */
/* Shutting down clocks that are no more required, if any.*/
if ((dma_streams_mask & STM32_DMA1_STREAMS_MASK) == 0)