47 rc = drv->
gpio_req(soc, port, pinmask);
49 goto err_drv_gpio_req;
74 if (pinmask & (~pinsts)) {
80 rc = drv->
gpio_rls(soc, port, pinmask);
82 goto err_drv_gpio_rls;
114 rc = drv->
gpio_cfg(soc, port, pinmask, cfg);
119 goto err_drv_gpio_cfg;
146 if (pinmask & (~pinsts)) {
152 rc = drv->
gpio_set(soc, port, pinmask);
185 if (pinmask & (~pinsts)) {
224 if (pinmask & (~pinsts)) {
265 if (pinmask & (~pinsts)) {
306 if (pinmask & (~pinsts)) {
312 rc = drv->
gpio_input(soc, port, pinmask, inbuf);
#define XWDS_GPIO_PIN_MASK(n)
xwer_t xwds_soc_grab(struct xwds_soc *soc)
XWDS API:增加对象的引用计数
xwer_t xwds_soc_put(struct xwds_soc *soc)
XWDS API:减少对象的引用计数
#define xwds_cast(type, dev)
#define XWDS_VALIDATE(exp, errstr,...)
#define EFAULT
Bad address
#define ENOSYS
Function not implemented
#define EBUSY
Device or resource busy
#define ERANGE
Result too large
#define EPERM
Operation not permitted
#define xwaop_c0m(type, a, m, nv, ov)
对原子变量进行原子操作:读取-位清0操作-回写
#define xwaop_load(type, a, memorder)
对原子变量进行原子操作:加载
#define xwaop_t0ma_then_s1m(type, a, m, nv, ov)
对原子变量进行原子操作:读取-位测试-位置1操作-回写
xwer_t xwds_gpio_reset(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:将SOC的GPIO设置为低电平
xwer_t xwds_gpio_input(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask, xwsq_t *inbuf)
XWDS API:并行读取多个SOC的GPIO
xwer_t xwds_gpio_cfg(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask, void *cfg)
XWDS API:配置SOC的GPIO
xwer_t xwds_gpio_rls(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:释放SOC的GPIO
xwer_t xwds_gpio_toggle(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:翻转SOC的GPIO电平
xwer_t xwds_gpio_set(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:将SOC的GPIO设置为高电平
xwer_t xwds_gpio_output(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask, xwsq_t out)
XWDS API:并行输出多个SOC的GPIO
xwer_t xwds_gpio_req(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:申请SOC的GPIO
const struct xwds_driver * drv
xwer_t(* gpio_output)(struct xwds_soc *, xwid_t, xwsq_t, xwsq_t)
xwer_t(* gpio_req)(struct xwds_soc *, xwid_t, xwsq_t)
xwer_t(* gpio_rls)(struct xwds_soc *, xwid_t, xwid_t)
xwer_t(* gpio_toggle)(struct xwds_soc *, xwid_t, xwsq_t)
xwer_t(* gpio_cfg)(struct xwds_soc *, xwid_t, xwsq_t, void *)
xwer_t(* gpio_set)(struct xwds_soc *, xwid_t, xwsq_t)
xwer_t(* gpio_input)(struct xwds_soc *, xwid_t, xwsq_t, xwsq_t *)
xwer_t(* gpio_reset)(struct xwds_soc *, xwid_t, xwsq_t)
struct xwds_soc::@23 gpio