diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-31 13:21:07 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-31 13:21:07 +0000 |
commit | 749edc4e23635a6f317ed92041e24a3add0292b4 (patch) | |
tree | 32df445ddf54331fb6a275c7f3c6b05224b6ccb3 | |
parent | 70a880a4d4e1ba03d71e369e3d9871a8d04f23b3 (diff) | |
download | ChibiOS-749edc4e23635a6f317ed92041e24a3add0292b4.tar.gz ChibiOS-749edc4e23635a6f317ed92041e24a3add0292b4.tar.bz2 ChibiOS-749edc4e23635a6f317ed92041e24a3add0292b4.zip |
Added I-class functions to the serial driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10919 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch | 104 | ||||
-rw-r--r-- | os/hal/include/hal_serial.h | 61 | ||||
-rw-r--r-- | readme.txt | 2 |
3 files changed, 93 insertions, 74 deletions
diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch b/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch index 620c606b2..92f436493 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch @@ -1,52 +1,52 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<launchConfiguration type="org.eclipse.cdt.debug.gdbjtag.launchConfigurationType"> -<stringAttribute key="bad_container_name" value="\RT-STM32F746G-DISCOVERY\debug"/> -<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="1"/> -<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="true"/> -<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="true"/> -<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/> -<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/> -<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value="set remotetimeout 20 monitor reset init monitor sleep 50 "/> -<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/> -<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="Generic TCP/IP"/> -<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/> -<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/> -<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/> -<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="3333"/> -<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/> -<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/> -<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="true"/> -<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/> -<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/> -<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/> -<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/> -<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/> -<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/> -<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/> -<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/> -<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/> -<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="arm-none-eabi-gdb"/> -<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="Standard"/> -<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/> -<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/> -<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="arm-none-eabi-gdb"/> -<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/> -<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/> -<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/> -<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="delta-next-vtlist-null-_idle_thread.lto_priv.25-(format)" val="4"/></contentList>"/> -<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <globalVariableList/> "/> -<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList> <memoryBlockExpressionItem> <expression text="0x0"/> </memoryBlockExpressionItem> </memoryBlockExpressionList> "/> -<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/> -<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RT-STM32F746G-DISCOVERY"/> -<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/> -<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="0.114656749"/> -<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> -<listEntry value="/RT-STM32F746G-DISCOVERY"/> -</listAttribute> -<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> -<listEntry value="4"/> -</listAttribute> -<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> -<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/> -</listAttribute> -</launchConfiguration> +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.cdt.debug.gdbjtag.launchConfigurationType">
+<stringAttribute key="bad_container_name" value="\RT-STM32F746G-DISCOVERY\debug"/>
+<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="1"/>
+<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="true"/>
+<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="true"/>
+<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>
+<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
+<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value="set remotetimeout 20 monitor reset init monitor sleep 50 "/>
+<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
+<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="Generic TCP/IP"/>
+<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
+<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
+<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
+<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="3333"/>
+<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/>
+<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
+<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="true"/>
+<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
+<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
+<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/>
+<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
+<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
+<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
+<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/>
+<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/>
+<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="arm-none-eabi-gdb"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="Standard"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/>
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>
+<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="arm-none-eabi-gdb"/>
+<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
+<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
+<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="delta-next-vtlist-null-_idle_thread.lto_priv.25-(format)" val="4"/></contentList>"/>
+<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <globalVariableList/> "/>
+<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList> <memoryBlockExpressionItem> <expression text="0x0"/> </memoryBlockExpressionItem> </memoryBlockExpressionList> "/>
+<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RT-STM32F746G-DISCOVERY"/>
+<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="0.114656749"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/RT-STM32F746G-DISCOVERY"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+</listAttribute>
+</launchConfiguration>
diff --git a/os/hal/include/hal_serial.h b/os/hal/include/hal_serial.h index 2a0925658..2276a49c8 100644 --- a/os/hal/include/hal_serial.h +++ b/os/hal/include/hal_serial.h @@ -140,7 +140,15 @@ struct SerialDriver { * writes directly on the output queue. This is faster but cannot
* be used to write to different channels implementations.
*
- * @see chnPutTimeout()
+ * @iclass
+ */
+#define sdPutI(sdp, b) oqPutI(&(sdp)->oqueue, b)
+
+/**
+ * @brief Direct write to a @p SerialDriver.
+ * @note This function bypasses the indirect access to the channel and
+ * writes directly on the output queue. This is faster but cannot
+ * be used to write to different channels implementations.
*
* @api
*/
@@ -152,8 +160,6 @@ struct SerialDriver { * writes directly on the output queue. This is faster but cannot
* be used to write to different channels implementations.
*
- * @see chnPutTimeout()
- *
* @api
*/
#define sdPutTimeout(sdp, b, t) oqPutTimeout(&(sdp)->oqueue, b, t)
@@ -164,7 +170,15 @@ struct SerialDriver { * reads directly from the input queue. This is faster but cannot
* be used to read from different channels implementations.
*
- * @see chnGetTimeout()
+ * @iclass
+ */
+#define sdGetI(sdp) iqGetI(&(sdp)->iqueue)
+
+/**
+ * @brief Direct read from a @p SerialDriver.
+ * @note This function bypasses the indirect access to the channel and
+ * reads directly from the input queue. This is faster but cannot
+ * be used to read from different channels implementations.
*
* @api
*/
@@ -176,8 +190,6 @@ struct SerialDriver { * reads directly from the input queue. This is faster but cannot
* be used to read from different channels implementations.
*
- * @see chnGetTimeout()
- *
* @api
*/
#define sdGetTimeout(sdp, t) iqGetTimeout(&(sdp)->iqueue, t)
@@ -188,12 +200,19 @@ struct SerialDriver { * writes directly to the output queue. This is faster but cannot
* be used to write from different channels implementations.
*
- * @see chnWrite()
+ * @iclass
+ */
+#define sdWriteI(sdp, b, n) oqWriteI(&(sdp)->oqueue, b, n)
+
+/**
+ * @brief Direct blocking write to a @p SerialDriver.
+ * @note This function bypasses the indirect access to the channel and
+ * writes directly to the output queue. This is faster but cannot
+ * be used to write from different channels implementations.
*
* @api
*/
-#define sdWrite(sdp, b, n) \
- oqWriteTimeout(&(sdp)->oqueue, b, n, TIME_INFINITE)
+#define sdWrite(sdp, b, n) oqWriteTimeout(&(sdp)->oqueue, b, n, TIME_INFINITE)
/**
* @brief Direct blocking write to a @p SerialDriver with timeout
@@ -202,8 +221,6 @@ struct SerialDriver { * writes directly to the output queue. This is faster but cannot
* be used to write to different channels implementations.
*
- * @see chnWriteTimeout()
- *
* @api
*/
#define sdWriteTimeout(sdp, b, n, t) \
@@ -215,8 +232,6 @@ struct SerialDriver { * writes directly to the output queue. This is faster but cannot
* be used to write to different channels implementations.
*
- * @see chnWriteTimeout()
- *
* @api
*/
#define sdAsynchronousWrite(sdp, b, n) \
@@ -228,12 +243,19 @@ struct SerialDriver { * reads directly from the input queue. This is faster but cannot
* be used to read from different channels implementations.
*
- * @see chnRead()
+ * @iclass
+ */
+#define sdReadI(sdp, b, n) iqReadI(&(sdp)->iqueue, b, n, TIME_INFINITE)
+
+/**
+ * @brief Direct blocking read from a @p SerialDriver.
+ * @note This function bypasses the indirect access to the channel and
+ * reads directly from the input queue. This is faster but cannot
+ * be used to read from different channels implementations.
*
* @api
*/
-#define sdRead(sdp, b, n) \
- iqReadTimeout(&(sdp)->iqueue, b, n, TIME_INFINITE)
+#define sdRead(sdp, b, n) iqReadTimeout(&(sdp)->iqueue, b, n, TIME_INFINITE)
/**
* @brief Direct blocking read from a @p SerialDriver with timeout
@@ -242,12 +264,9 @@ struct SerialDriver { * reads directly from the input queue. This is faster but cannot
* be used to read from different channels implementations.
*
- * @see chnReadTimeout()
- *
* @api
*/
-#define sdReadTimeout(sdp, b, n, t) \
- iqReadTimeout(&(sdp)->iqueue, b, n, t)
+#define sdReadTimeout(sdp, b, n, t) iqReadTimeout(&(sdp)->iqueue, b, n, t)
/**
* @brief Direct non-blocking read from a @p SerialDriver.
@@ -255,8 +274,6 @@ struct SerialDriver { * reads directly from the input queue. This is faster but cannot
* be used to read from different channels implementations.
*
- * @see chnReadTimeout()
- *
* @api
*/
#define sdAsynchronousRead(sdp, b, n) \
diff --git a/readme.txt b/readme.txt index 81f856bfe..a1e91fcb6 100644 --- a/readme.txt +++ b/readme.txt @@ -89,6 +89,8 @@ *****************************************************************************
*** Next ***
+- NEW: Added I-class functions to the serial driver: sdGetI(), sdReadI(),
+ sdPutI() and sdWriteI().
- NEW: Modified the HAL queues to improve performance. Added new
functions iqGetI(), iqReadI(), oqPutI() and oqWriteI().
- NEW: Added an "Objects FIFO" object to the OS Library, it allows to
|