rwmingis / InterruptButton

This is an interrupt based button event library for the ESP32. It enables binding user defined actions to button events including 'Key Down', Key Up' , 'Key Press', 'Long Key Press' 'AutoRepeat Press' and 'Double-Click'. The actions associated it these events may be executed Asynchronously, Synchronously, or a Hybrid between the two.
MIT License
30 stars 8 forks source link

RTOS API #16

Closed davidzhu210 closed 1 year ago

davidzhu210 commented 1 year ago

I need to use RTOS API in the event fucntion. For example, sending some data to a queue, should I use regular API, or API with _FromISR? xQueueOverwrite(QueueHandle_t xQueue, const void pvItemToQueue); xQueueOverwriteFromISR(QueueHandle_t xQueue, const void pvItemToQueue,BaseType_t *pxHigherPriorityTaskWoken); Thanks.

rwmingis commented 1 year ago

I think just the regular version since the event pocedures are called from an RTOS task, not directly from the ISR.

On Fri, 21 July 2023, 1:21 am davidzhu210, @.***> wrote:

I need to use RTOS API in the event fucntion. For example, sending some data to a queue, should I use regular API, or API with _FromISR? xQueueOverwrite(QueueHandle_t xQueue, const void pvItemToQueue); xQueueOverwriteFromISR(QueueHandle_t xQueue, const void pvItemToQueue,BaseType_t *pxHigherPriorityTaskWoken); Thanks.

— Reply to this email directly, view it on GitHub https://github.com/rwmingis/InterruptButton/issues/16, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALW24E6VKVMXB6EPBQA2NVTXRFEJHANCNFSM6AAAAAA2RTCA7I . You are receiving this because you are subscribed to this thread.Message ID: @.***>

davidzhu210 commented 1 year ago

Got it. Thank you!

Thanks, David


From: rwmingis @.> Sent: Sunday, July 23, 2023 2:14 AM To: rwmingis/InterruptButton @.> Cc: davidzhu210 @.>; Author @.> Subject: Re: [rwmingis/InterruptButton] RTOS API (Issue #16)

I think just the regular version since the event pocedures are called from an RTOS task, not directly from the ISR.

On Fri, 21 July 2023, 1:21 am davidzhu210, @.***> wrote:

I need to use RTOS API in the event fucntion. For example, sending some data to a queue, should I use regular API, or API with _FromISR? xQueueOverwrite(QueueHandle_t xQueue, const void pvItemToQueue); xQueueOverwriteFromISR(QueueHandle_t xQueue, const void pvItemToQueue,BaseType_t *pxHigherPriorityTaskWoken); Thanks.

— Reply to this email directly, view it on GitHub https://github.com/rwmingis/InterruptButton/issues/16, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALW24E6VKVMXB6EPBQA2NVTXRFEJHANCNFSM6AAAAAA2RTCA7I . You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/rwmingis/InterruptButton/issues/16#issuecomment-1646642795, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALMASQ5W2Z4KDCYQPDDBYLLXRQJ7BANCNFSM6AAAAAA2RTCA7I. You are receiving this because you authored the thread.Message ID: @.***>