diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-04-03 18:39:39 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-04-03 18:39:39 +0000 |
commit | 4bae8b9a024cdfc2dc9b3cadbf7a465b3230caaf (patch) | |
tree | 9138b235a481c2355ed8d96064b2c52f370eaf1a /os | |
parent | 2945fe13492f31fdbebc503bf8cbec9d034c6f72 (diff) | |
download | ChibiOS-4bae8b9a024cdfc2dc9b3cadbf7a465b3230caaf.tar.gz ChibiOS-4bae8b9a024cdfc2dc9b3cadbf7a465b3230caaf.tar.bz2 ChibiOS-4bae8b9a024cdfc2dc9b3cadbf7a465b3230caaf.zip |
Completed hardware checksum, added the driver to F2 and F4.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4076 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/platforms/STM32/mac_lld.c | 8 | ||||
-rw-r--r-- | os/hal/platforms/STM32F2xx/platform.mk | 1 | ||||
-rw-r--r-- | os/hal/platforms/STM32F4xx/platform.mk | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32/mac_lld.c b/os/hal/platforms/STM32/mac_lld.c index 30370fe9f..2ddbc885a 100644 --- a/os/hal/platforms/STM32/mac_lld.c +++ b/os/hal/platforms/STM32/mac_lld.c @@ -497,8 +497,12 @@ msg_t max_lld_get_receive_descriptor(MACDriver *macp, /* Iterates through received frames until a valid one is found, invalid
frames are discarded.*/
while (!(rdes->rdes0 & STM32_RDES0_OWN)) {
- if (!(rdes->rdes0 & (STM32_RDES0_AFM | STM32_RDES0_ES)) &&
- (rdes->rdes0 & STM32_RDES0_FS) && (rdes->rdes0 & STM32_RDES0_LS)) {
+ if (!(rdes->rdes0 & (STM32_RDES0_AFM | STM32_RDES0_ES
+#if STM32_IP_CHECKSUM_OFFLOAD
+ | STM32_RDES0_IPHCE | STM32_RDES0_PCE
+#endif
+ )) && (rdes->rdes0 & STM32_RDES0_FS) &&
+ (rdes->rdes0 & STM32_RDES0_LS)) {
/* Found a valid one.*/
rdp->offset = 0;
rdp->size = ((rdes->rdes0 & STM32_RDES0_FL_MASK) >> 16) - 4;
diff --git a/os/hal/platforms/STM32F2xx/platform.mk b/os/hal/platforms/STM32F2xx/platform.mk index e9aee9817..92dca2228 100644 --- a/os/hal/platforms/STM32F2xx/platform.mk +++ b/os/hal/platforms/STM32F2xx/platform.mk @@ -6,6 +6,7 @@ PLATFORMSRC = ${CHIBIOS}/os/hal/platforms/STM32F2xx/stm32_dma.c \ ${CHIBIOS}/os/hal/platforms/STM32/gpt_lld.c \
${CHIBIOS}/os/hal/platforms/STM32/i2c_lld.c \
${CHIBIOS}/os/hal/platforms/STM32/icu_lld.c \
+ ${CHIBIOS}/os/hal/platforms/STM32/mac_lld.c \
${CHIBIOS}/os/hal/platforms/STM32/pwm_lld.c \
${CHIBIOS}/os/hal/platforms/STM32/serial_lld.c \
${CHIBIOS}/os/hal/platforms/STM32/spi_lld.c \
diff --git a/os/hal/platforms/STM32F4xx/platform.mk b/os/hal/platforms/STM32F4xx/platform.mk index 2decebca4..128bb854f 100644 --- a/os/hal/platforms/STM32F4xx/platform.mk +++ b/os/hal/platforms/STM32F4xx/platform.mk @@ -6,6 +6,7 @@ PLATFORMSRC = ${CHIBIOS}/os/hal/platforms/STM32F4xx/stm32_dma.c \ ${CHIBIOS}/os/hal/platforms/STM32/gpt_lld.c \
${CHIBIOS}/os/hal/platforms/STM32/i2c_lld.c \
${CHIBIOS}/os/hal/platforms/STM32/icu_lld.c \
+ ${CHIBIOS}/os/hal/platforms/STM32/mac_lld.c \
${CHIBIOS}/os/hal/platforms/STM32/pwm_lld.c \
${CHIBIOS}/os/hal/platforms/STM32/serial_lld.c \
${CHIBIOS}/os/hal/platforms/STM32/spi_lld.c \
|