diff options
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/include/hal_buffers.h | 4 | ||||
-rw-r--r-- | os/hal/include/hal_queues.h | 72 | ||||
-rw-r--r-- | os/hal/ports/STM32/LLD/CANv1/can_lld.c | 2 |
3 files changed, 4 insertions, 74 deletions
diff --git a/os/hal/include/hal_buffers.h b/os/hal/include/hal_buffers.h index 7ce499215..c7f731f83 100644 --- a/os/hal/include/hal_buffers.h +++ b/os/hal/include/hal_buffers.h @@ -128,11 +128,11 @@ typedef io_buffers_queue_t output_buffers_queue_t; /**
* @brief Computes the size of a buffers queue buffer size.
*
- * @param[in] n sumber of buffers in the queue
+ * @param[in] n number of buffers in the queue
* @param[in] size size of the buffers
*/
#define BQ_BUFFER_SIZE(n, size) \
- (((size_t)(size) + sizeof (size_t)) * (size_t)(n))
+ (((size_t)(size) + (sizeof (size_t)) * (size_t)(n)))
/**
* @name Macro Functions
diff --git a/os/hal/include/hal_queues.h b/os/hal/include/hal_queues.h index a2149f9fe..42d70953a 100644 --- a/os/hal/include/hal_queues.h +++ b/os/hal/include/hal_queues.h @@ -193,42 +193,6 @@ typedef io_queue_t input_queue_t; /** @} */
/**
- * @brief Data part of a static input queue initializer.
- * @details This macro should be used when statically initializing an
- * input queue that is part of a bigger structure.
- *
- * @param[in] name the name of the input queue variable
- * @param[in] buffer pointer to the queue buffer area
- * @param[in] size size of the queue buffer area
- * @param[in] inotify input notification callback pointer
- * @param[in] link application defined pointer
- */
-#define _INPUTQUEUE_DATA(name, buffer, size, inotify, link) { \
- NULL, \
- 0U, \
- (uint8_t *)(buffer), \
- (uint8_t *)(buffer) + (size), \
- (uint8_t *)(buffer), \
- (uint8_t *)(buffer), \
- (inotify), \
- (link) \
-}
-
-/**
- * @brief Static input queue initializer.
- * @details Statically initialized input queues require no explicit
- * initialization using @p iqInit().
- *
- * @param[in] name the name of the input queue variable
- * @param[in] buffer pointer to the queue buffer area
- * @param[in] size size of the queue buffer area
- * @param[in] inotify input notification callback pointer
- * @param[in] link application defined pointer
- */
-#define INPUTQUEUE_DECL(name, buffer, size, inotify, link) \
- input_queue_t name = _INPUTQUEUE_DATA(name, buffer, size, inotify, link)
-
-/**
* @extends io_queue_t
*
* @brief Type of an output queue structure.
@@ -308,42 +272,6 @@ typedef io_queue_t output_queue_t; #define oqPut(oqp, b) oqPutTimeout(oqp, b, TIME_INFINITE)
/** @} */
-/**
- * @brief Data part of a static output queue initializer.
- * @details This macro should be used when statically initializing an
- * output queue that is part of a bigger structure.
- *
- * @param[in] name the name of the output queue variable
- * @param[in] buffer pointer to the queue buffer area
- * @param[in] size size of the queue buffer area
- * @param[in] onotify output notification callback pointer
- * @param[in] link application defined pointer
- */
-#define _OUTPUTQUEUE_DATA(name, buffer, size, onotify, link) { \
- NULL, \
- (size), \
- (uint8_t *)(buffer), \
- (uint8_t *)(buffer) + (size), \
- (uint8_t *)(buffer), \
- (uint8_t *)(buffer), \
- (onotify), \
- (link) \
-}
-
-/**
- * @brief Static output queue initializer.
- * @details Statically initialized output queues require no explicit
- * initialization using @p oqInit().
- *
- * @param[in] name the name of the output queue variable
- * @param[in] buffer pointer to the queue buffer area
- * @param[in] size size of the queue buffer area
- * @param[in] onotify output notification callback pointer
- * @param[in] link application defined pointer
- */
-#define OUTPUTQUEUE_DECL(name, buffer, size, onotify, link) \
- output_queue_t name = _OUTPUTQUEUE_DATA(name, buffer, size, onotify, link)
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/os/hal/ports/STM32/LLD/CANv1/can_lld.c b/os/hal/ports/STM32/LLD/CANv1/can_lld.c index 345d209f1..1c2895acf 100644 --- a/os/hal/ports/STM32/LLD/CANv1/can_lld.c +++ b/os/hal/ports/STM32/LLD/CANv1/can_lld.c @@ -278,6 +278,8 @@ static void can_lld_sce_handler(CANDriver *canp) { flags = (eventflags_t)(esr & 7);
if ((esr & CAN_ESR_LEC) > 0)
flags |= CAN_FRAMING_ERROR;
+#else
+ flags = 0;
#endif
osalSysLockFromISR();
|