Zephyr Project API
3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
nxp_flexio.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2024, STRIM, ALC
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_DRIVERS_MISC_NXP_FLEXIO_NXP_FLEXIO_H_
8
#define ZEPHYR_DRIVERS_MISC_NXP_FLEXIO_NXP_FLEXIO_H_
9
10
#include <
zephyr/device.h
>
11
17
struct
nxp_flexio_child_res
{
18
uint8_t
*
shifter_index
;
19
uint8_t
shifter_count
;
20
uint8_t
*
timer_index
;
21
uint8_t
timer_count
;
22
};
23
30
typedef
int (*
nxp_flexio_child_isr_t
)(
void
*
user_data
);
31
36
struct
nxp_flexio_child
{
37
nxp_flexio_child_isr_t
isr
;
38
void
*
user_data
;
39
struct
nxp_flexio_child_res
res
;
40
};
41
46
void
nxp_flexio_irq_enable
(
const
struct
device
*dev);
47
52
void
nxp_flexio_irq_disable
(
const
struct
device
*dev);
53
58
void
nxp_flexio_lock
(
const
struct
device
*dev);
59
64
void
nxp_flexio_unlock
(
const
struct
device
*dev);
65
76
int
nxp_flexio_get_rate
(
const
struct
device
*dev,
uint32_t
*rate);
77
85
int
nxp_flexio_child_attach
(
const
struct
device
*dev,
86
const
struct
nxp_flexio_child
*child);
87
88
#endif
/* ZEPHYR_DRIVERS_MISC_NXP_FLEXIO_NXP_FLEXIO_H_ */
device.h
nxp_flexio_child_attach
int nxp_flexio_child_attach(const struct device *dev, const struct nxp_flexio_child *child)
Attach flexio child to flexio controller.
nxp_flexio_irq_disable
void nxp_flexio_irq_disable(const struct device *dev)
Disable FlexIO IRQ.
nxp_flexio_lock
void nxp_flexio_lock(const struct device *dev)
Lock FlexIO mutex.
nxp_flexio_child_isr_t
int(* nxp_flexio_child_isr_t)(void *user_data)
Callback API to inform API user that FlexIO triggered interrupt.
Definition
nxp_flexio.h:30
nxp_flexio_irq_enable
void nxp_flexio_irq_enable(const struct device *dev)
Enable FlexIO IRQ.
nxp_flexio_get_rate
int nxp_flexio_get_rate(const struct device *dev, uint32_t *rate)
Obtain the clock rate of sub-system used by the FlexIO.
nxp_flexio_unlock
void nxp_flexio_unlock(const struct device *dev)
Unlock FlexIO mutex.
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
device
Runtime device structure (in ROM) per driver instance.
Definition
device.h:403
nxp_flexio_child_res
Structure containing information about the required resources for a FlexIO child.
Definition
nxp_flexio.h:17
nxp_flexio_child_res::timer_count
uint8_t timer_count
Definition
nxp_flexio.h:21
nxp_flexio_child_res::timer_index
uint8_t * timer_index
Definition
nxp_flexio.h:20
nxp_flexio_child_res::shifter_count
uint8_t shifter_count
Definition
nxp_flexio.h:19
nxp_flexio_child_res::shifter_index
uint8_t * shifter_index
Definition
nxp_flexio.h:18
nxp_flexio_child
Structure containing the required child data for FlexIO.
Definition
nxp_flexio.h:36
nxp_flexio_child::isr
nxp_flexio_child_isr_t isr
Definition
nxp_flexio.h:37
nxp_flexio_child::user_data
void * user_data
Definition
nxp_flexio.h:38
nxp_flexio_child::res
struct nxp_flexio_child_res res
Definition
nxp_flexio.h:39
user_data
static const intptr_t user_data[5]
Definition
main.c:588
include
zephyr
drivers
misc
nxp_flexio
nxp_flexio.h
Generated on Sun Sep 15 2024 17:01:30 for Zephyr Project API by
1.9.8