aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F0xx/crc/mcuconf_community.h
diff options
context:
space:
mode:
authorMichael Spradling <mike@mspradling.com>2015-06-29 21:54:13 -0400
committerMichael Spradling <mike@mspradling.com>2015-08-16 01:26:07 -0400
commit316c3b4825689afca170576e5a5681302f64fdfa (patch)
treea00655dd3e1a38efa06b030f3051863a1eb15b2e /testhal/STM32/STM32F0xx/crc/mcuconf_community.h
parentab80aabfd48b50e122f6ff43adeedd1af4a5a607 (diff)
downloadChibiOS-Contrib-316c3b4825689afca170576e5a5681302f64fdfa.tar.gz
ChibiOS-Contrib-316c3b4825689afca170576e5a5681302f64fdfa.tar.bz2
ChibiOS-Contrib-316c3b4825689afca170576e5a5681302f64fdfa.zip
Add CRC Driver
This patch includes a high level and two low level drivers. The high level driver is enabled with flag HAL_USE_CRC The low level drivers include: * Hardware CRC for the STM32 cortex processor lines.(when supported) * Enabled with flag STM32_CRC_USE_CRC1 * DMA is enabled with CRC_USE_DMA * SYNC api will use DMA, but put calling thread to sleep * ASYNC api enabled. * DMA Disabled * SYNC api spin while calculating CRC * ASYNC api disabled * Software CRC (3 modes) * CRCSW_CRC32_TABLE - Enables crc32 with lookup table. * CRCSW_CRC16_TABLE - Enables crc16 with lookup tables. * CRCSW_PROGRAMMBLE - Enables any crc done with computation. * Can calculate any crc configuration. * CRC_USE_DMA obviously not support with software CRC
Diffstat (limited to 'testhal/STM32/STM32F0xx/crc/mcuconf_community.h')
-rw-r--r--testhal/STM32/STM32F0xx/crc/mcuconf_community.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/testhal/STM32/STM32F0xx/crc/mcuconf_community.h b/testhal/STM32/STM32F0xx/crc/mcuconf_community.h
new file mode 100644
index 0000000..8df78ec
--- /dev/null
+++ b/testhal/STM32/STM32F0xx/crc/mcuconf_community.h
@@ -0,0 +1,33 @@
+/*
+ ChibiOS/RT - Copyright (C) 2015 Michael D. Spradling
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef _MCUCONF_COMMUNITY_H_
+#define _MCUCONF_COMMUNITY_H_
+
+/*
+ * CRC driver system settings.
+ */
+#define STM32_CRC_USE_CRC1 TRUE
+#define STM32_CRC_CRC1_DMA_IRQ_PRIORITY 1
+#define STM32_CRC_CRC1_DMA_PRIORITY 2
+#define STM32_CRC_CRC1_DMA_STREAM STM32_DMA1_STREAM2
+
+#define CRCSW_USE_CRC1 FALSE
+#define CRCSW_CRC32_TABLE TRUE
+#define CRCSW_CRC16_TABLE TRUE
+#define CRCSW_PROGRAMMABLE TRUE
+
+#endif