Fixed bug #659.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8415 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
61509a21de
commit
ca59ce3238
|
@ -131,30 +131,6 @@ struct SerialDriver {
|
||||||
* @name Macro Functions
|
* @name Macro Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/**
|
|
||||||
* @brief Direct output check on a @p SerialDriver.
|
|
||||||
* @note This function bypasses the indirect access to the channel and
|
|
||||||
* checks directly the output queue. This is faster but cannot
|
|
||||||
* be used to check different channels implementations.
|
|
||||||
*
|
|
||||||
* @deprecated
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
#define sdPutWouldBlock(sdp) oqIsFullI(&(sdp)->oqueue)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Direct input check on a @p SerialDriver.
|
|
||||||
* @note This function bypasses the indirect access to the channel and
|
|
||||||
* checks directly the input queue. This is faster but cannot
|
|
||||||
* be used to check different channels implementations.
|
|
||||||
*
|
|
||||||
* @deprecated
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
#define sdGetWouldBlock(sdp) iqIsEmptyI(&(sdp)->iqueue)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Direct write to a @p SerialDriver.
|
* @brief Direct write to a @p SerialDriver.
|
||||||
* @note This function bypasses the indirect access to the channel and
|
* @note This function bypasses the indirect access to the channel and
|
||||||
|
@ -297,6 +273,8 @@ extern "C" {
|
||||||
void sdStop(SerialDriver *sdp);
|
void sdStop(SerialDriver *sdp);
|
||||||
void sdIncomingDataI(SerialDriver *sdp, uint8_t b);
|
void sdIncomingDataI(SerialDriver *sdp, uint8_t b);
|
||||||
msg_t sdRequestDataI(SerialDriver *sdp);
|
msg_t sdRequestDataI(SerialDriver *sdp);
|
||||||
|
bool sdPutWouldBlock(SerialDriver *sdp);
|
||||||
|
bool sdGetWouldBlock(SerialDriver *sdp);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -234,6 +234,55 @@ msg_t sdRequestDataI(SerialDriver *sdp) {
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Direct output check on a @p SerialDriver.
|
||||||
|
* @note This function bypasses the indirect access to the channel and
|
||||||
|
* checks directly the output queue. This is faster but cannot
|
||||||
|
* be used to check different channels implementations.
|
||||||
|
*
|
||||||
|
* @param[in] sdp pointer to a @p SerialDriver structure
|
||||||
|
* @return The queue status.
|
||||||
|
* @retval false if the next write operation would not block.
|
||||||
|
* @retval true if the next write operation would block.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
bool sdPutWouldBlock(SerialDriver *sdp) {
|
||||||
|
bool b;
|
||||||
|
|
||||||
|
osalSysLock();
|
||||||
|
b = oqIsFullI(&sdp->oqueue);
|
||||||
|
osalSysUnlock();
|
||||||
|
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Direct input check on a @p SerialDriver.
|
||||||
|
* @note This function bypasses the indirect access to the channel and
|
||||||
|
* checks directly the input queue. This is faster but cannot
|
||||||
|
* be used to check different channels implementations.
|
||||||
|
*
|
||||||
|
* @return The queue status.
|
||||||
|
* @retval false if the next write operation would not block.
|
||||||
|
* @retval true if the next write operation would block.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
bool sdGetWouldBlock(SerialDriver *sdp) {
|
||||||
|
bool b;
|
||||||
|
|
||||||
|
osalSysLock();
|
||||||
|
b = iqIsEmptyI(&sdp->iqueue);
|
||||||
|
osalSysUnlock();
|
||||||
|
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* HAL_USE_SERIAL == TRUE */
|
#endif /* HAL_USE_SERIAL == TRUE */
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -126,6 +126,8 @@
|
||||||
- HAL: Updated STM32F0xx headers to STM32CubeF0 version 1.3.0. Added support
|
- HAL: Updated STM32F0xx headers to STM32CubeF0 version 1.3.0. Added support
|
||||||
for STM32F030xC, STM32F070x6, STM32F070xB, STM32F091xC,
|
for STM32F030xC, STM32F070x6, STM32F070xB, STM32F091xC,
|
||||||
STM32F098xx devices.
|
STM32F098xx devices.
|
||||||
|
- HAL: Fixed invalid class type for sdPutWouldBlock() and sdGetWouldBlock()
|
||||||
|
functions (bug #659)(backported to 3.0.3 and 2.6.10).
|
||||||
- HAL: Fixed STM32F0xx HAL missing MCOPRE support (bug #658).
|
- HAL: Fixed STM32F0xx HAL missing MCOPRE support (bug #658).
|
||||||
- HAL: Fixed STM32L1xx HAL errors in comments (bug #657)(backported
|
- HAL: Fixed STM32L1xx HAL errors in comments (bug #657)(backported
|
||||||
to 3.0.3 and 2.6.10).
|
to 3.0.3 and 2.6.10).
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
<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.COREFILE_PATH" value=""/>
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" 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="CR2-adc-adcp-adc_lld_start_conversion-(format)" val="4"/><content id="CR2-adc-null-port_wait_for_interrupt-(format)" val="4"/><content id="cr2-adc_lld_start_conversion-(format)" val="4"/></contentList>"/>
|
<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="cr2-adc_lld_start_conversion-(format)" val="4"/><content id="CR2-adc-null-port_wait_for_interrupt-(format)" val="4"/><content id="CR2-adc-adcp-adc_lld_start_conversion-(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.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/> "/>
|
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList/> "/>
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
|
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
|
||||||
|
|
Loading…
Reference in New Issue