aboutsummaryrefslogtreecommitdiffstats
path: root/src/chqueues.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/chqueues.c')
-rw-r--r--src/chqueues.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/chqueues.c b/src/chqueues.c
index eafa50d42..ec456c5f1 100644
--- a/src/chqueues.c
+++ b/src/chqueues.c
@@ -35,7 +35,7 @@
* @param inotify pointer to a callback function that is invoked when
* some data is read from the Queue. The value can be \p NULL.
*/
-void chIQInit(Queue *qp, uint8_t *buffer, t_size size, t_qnotify inotify) {
+void chIQInit(Queue *qp, uint8_t *buffer, size_t size, qnotify_t inotify) {
qp->q_buffer = qp->q_rdptr = qp->q_wrptr = buffer;
qp->q_top = buffer + size;
@@ -68,7 +68,7 @@ void chIQReset(Queue *qp) {
* @note This function must be called with interrupts disabled or from an
* interrupt handler.
*/
-t_msg chIQPutI(Queue *qp, uint8_t b) {
+msg_t chIQPutI(Queue *qp, uint8_t b) {
if (chIQIsFull(qp))
return Q_FULL;
@@ -86,7 +86,7 @@ t_msg chIQPutI(Queue *qp, uint8_t b) {
* @param qp pointer to a \p Queue structure
* @return a byte from the queue or \p Q_RESET if the queue was reset
*/
-t_msg chIQGet(Queue *qp) {
+msg_t chIQGet(Queue *qp) {
uint8_t b;
chSysLock();
@@ -119,9 +119,9 @@ t_msg chIQGet(Queue *qp) {
* @note The function is available only if the \p CH_USE_QUEUES_TIMEOUT
* option is enabled in \p chconf.h.
*/
-t_msg chIQGetTimeout(Queue *qp, t_time time) {
+msg_t chIQGetTimeout(Queue *qp, systime_t time) {
uint8_t b;
- t_msg msg;
+ msg_t msg;
chSysLock();
@@ -153,9 +153,9 @@ t_msg chIQGetTimeout(Queue *qp, t_time time) {
* @note The function is not atomic, if you need atomicity it is suggested
* to use a semaphore for mutual exclusion.
*/
-t_size chIQRead(Queue *qp, uint8_t *buffer, t_size n) {
+size_t chIQRead(Queue *qp, uint8_t *buffer, size_t n) {
- t_size r = 0;
+ size_t r = 0;
while (n--) {
chSysLock();
@@ -193,7 +193,7 @@ t_size chIQRead(Queue *qp, uint8_t *buffer, t_size n) {
* @param onotify pointer to a callback function that is invoked when
* some data is written in the Queue. The value can be \p NULL.
*/
-void chOQInit(Queue *qp, uint8_t *buffer, t_size size, t_qnotify onotify) {
+void chOQInit(Queue *qp, uint8_t *buffer, size_t size, qnotify_t onotify) {
qp->q_buffer = qp->q_rdptr = qp->q_wrptr = buffer;
qp->q_top = buffer + size;
@@ -211,7 +211,7 @@ void chOQReset(Queue *qp) {
chSysLock();
qp->q_rdptr = qp->q_wrptr = qp->q_buffer;
- chSemResetI(&qp->q_sem, (t_cnt)(qp->q_top - qp->q_buffer));
+ chSemResetI(&qp->q_sem, (cnt_t)(qp->q_top - qp->q_buffer));
chSysUnlock();
}
@@ -245,7 +245,7 @@ void chOQPut(Queue *qp, uint8_t b) {
* @note This function must be called with interrupts disabled or from an
* interrupt handler.
*/
-t_msg chOQGetI(Queue *qp) {
+msg_t chOQGetI(Queue *qp) {
uint8_t b;
if (chOQIsEmpty(qp))
@@ -268,9 +268,9 @@ t_msg chOQGetI(Queue *qp) {
* @note The function is not atomic, if you need atomicity it is suggested
* to use a semaphore for mutual exclusion.
*/
-t_size chOQWrite(Queue *qp, uint8_t *buffer, t_size n) {
+size_t chOQWrite(Queue *qp, uint8_t *buffer, size_t n) {
- t_size w = 0;
+ size_t w = 0;
while (n--) {
chSysLock();
@@ -311,8 +311,8 @@ t_size chOQWrite(Queue *qp, uint8_t *buffer, t_size n) {
* @param onotify pointer to a callback function that is invoked when
* some data is written to the queue. The value can be \p NULL.
*/
-void chHDQInit(HalfDuplexQueue *qp, uint8_t *buffer, t_size size,
- t_qnotify inotify, t_qnotify onotify) {
+void chHDQInit(HalfDuplexQueue *qp, uint8_t *buffer, size_t size,
+ qnotify_t inotify, qnotify_t onotify) {
qp->hdq_buffer = qp->hdq_rdptr = qp->hdq_wrptr = buffer;
qp->hdq_top = buffer + size;
@@ -328,7 +328,7 @@ void chHDQInit(HalfDuplexQueue *qp, uint8_t *buffer, t_size size,
* @param qp pointer to a \p HalfDuplexQueue structure
* @return the byte value or \p Q_RESET if the queue was reset
*/
-t_msg chHDQGetReceive(HalfDuplexQueue *qp) {
+msg_t chHDQGetReceive(HalfDuplexQueue *qp) {
uint8_t b;
chSysLock();
@@ -363,9 +363,9 @@ t_msg chHDQGetReceive(HalfDuplexQueue *qp) {
* @note The function is available only if the \p CH_USE_QUEUES_TIMEOUT
* option is enabled in \p chconf.h.
*/
-t_msg chHDQGetReceiveTimeout(HalfDuplexQueue *qp, t_time time) {
+msg_t chHDQGetReceiveTimeout(HalfDuplexQueue *qp, systime_t time) {
uint8_t b;
- t_msg msg;
+ msg_t msg;
chSysLock();
@@ -431,7 +431,7 @@ void chHDQPutTransmit(HalfDuplexQueue *qp, uint8_t b) {
* @note This function must be called with interrupts disabled or from an
* interrupt handler.
*/
-t_msg chHDQGetTransmitI(HalfDuplexQueue *qp) {
+msg_t chHDQGetTransmitI(HalfDuplexQueue *qp) {
uint8_t b;
if (!chHDQIsTransmitting(qp))
@@ -454,7 +454,7 @@ t_msg chHDQGetTransmitI(HalfDuplexQueue *qp) {
* @note This function must be called with interrupts disabled or from an
* interrupt handler.
*/
-t_msg chHDQPutReceiveI(HalfDuplexQueue *qp, uint8_t b) {
+msg_t chHDQPutReceiveI(HalfDuplexQueue *qp, uint8_t b) {
if (chHDQIsTransmitting(qp))
return Q_FULL;