feat(pcnt): support set interrupt priority

This commit is contained in:
Chen Jichang
2023-08-10 20:42:39 +08:00
parent 06a4943e41
commit 92cc9fca07
5 changed files with 62 additions and 8 deletions

View File

@@ -59,8 +59,10 @@ typedef struct {
* @brief PCNT unit configuration
*/
typedef struct {
int low_limit; /*!< Low limitation of the count unit, should be lower than 0 */
int high_limit; /*!< High limitation of the count unit, should be higher than 0 */
int low_limit; /*!< Low limitation of the count unit, should be lower than 0 */
int high_limit; /*!< High limitation of the count unit, should be higher than 0 */
int intr_priority; /*!< PCNT interrupt priority,
if set to 0, the driver will try to allocate an interrupt with a relative low priority (1,2,3) */
struct {
uint32_t accum_count: 1; /*!< Whether to accumulate the count value when overflows at the high/low limit */
} flags; /*!< Extra flags */