mpu_prototypes.h

kg7hf wrote on Monday, December 18, 2017:

In v10, should there be MPU_x versions of:

BaseType_t xQueuePeek( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait );
BaseType_t xQueuePeekFromISR( QueueHandle_t pxQueue, void * const pvBuffer );
BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait );

?

rtel wrote on Monday, December 18, 2017:

BaseType_t xQueuePeek( QueueHandle_t xQueue, void * const pvBuffer,
TickType_t xTicksToWait );

That is in there already.

BaseType_t xQueuePeekFromISR( QueueHandle_t pxQueue, void * const
pvBuffer );

I don’t think ISR safe functions are necessary as they are privileged
already and don’t need two switch to privileged mode.

BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t
xTicksToWait );

That is also already in there.

kg7hf wrote on Monday, December 18, 2017:

Hi Richard,
Thanks for the quick reply, and nice to meet you.

Yes, I agree that the ISR routine shouldn’t be necessary. Let me double check my download, but what I’m saying is that in mpu_prototypes.h that the function should be defined as:

MPU_xQueuePeek() and MPU_xQueueSemaphoreTake(),

kg7hf wrote on Monday, December 18, 2017:

Double checked. I’m not sure why it would be necessary, but there is a function in mpu_wrappers.c called
BaseType_t MPU_xQueuePeekFromISR(), for whatever reason, it raises the privilege, although I would have thought an ISR is already at the raised privilege.

I also double checked the MPU_x prototypes in mpu_prototypes.h, and the ones cited do seem to be missing the MPU_ tag.

Paul

rtel wrote on Monday, December 18, 2017:

Ah - I see what you mean now. I was looking in mcu_wrappers.h not mcu_prototypes.h. Will catch that too.

kg7hf wrote on Tuesday, December 19, 2017:

Thanks Richard, all good!