nrf52裸机学习——GPIO操作
/**
* @brief Function for writing a value to a GPIO pin.
*
* Note that the pin must be configured as an output for this
* function to have any effect.
*
* @param pin_number Specifies the pin number to write.
*
* @param value Specifies the value to be written to the pin.
* @arg 0 Clears the pin.
* @arg >=1 Sets the pin.
*/
__STATIC_INLINE void nrf_gpio_pin_write(uint32_t pin_number, uint32_t value);
实例:
nrf_gpio_pin_write(m_board_led_list[led_idx], LEDS_ACTIVE_STATE ? 0 : 1);
/**
* @brief Function for configuring the given GPIO pin number as output, hiding inner details.
* This function can be used to configure a pin as simple output with gate driving GPIO_PIN_CNF_DRIVE_S0S1 (normal cases).
*
* @param pin_number Specifies the pin number.
*
* @note Sense capability on the pin is disabled and input is disconnected from the
buffer as the pins are configured as output.
*/
__STATIC_INLINE void nrf_gpio_cfg_output(uint32_t pin_number);
实例
nrf_gpio_cfg_output(m_board_led_list[i]);
最新文章
- 将centos7打造成桌面系统
- HTML标签用法
- 推荐一个linux下的web压力测试工具神器webbench
- AngularJS中的MVC模式
- spring验证事务的代码,用到了mockito
- 设计模式 ( 二十 ) 访问者模式Visitor(对象行为型)
- [转]java-Three Rules for Effective Exception Handling
- windows 下odoo 不同版本安装运行问题
- 【技术】关于安卓使用禁用服务(或者是MYANDROIDTOOLS里面的禁用服务)后卡在开机页面的(或者是卡在各种页面的)
- 使用摄像头或视频运行 ORB-SLAM2 SLAM14讲 第一次课后作业
- jquery.form.js 实现异步上传
- VB.NET语法小结
- JVM内核优化
- Nginx 功能模块
- Django Form&;ModelForm
- mysql 锁表操作流程
- 火狐浏览器Firefox如何使用插件,火狐有哪些好用的插件
- Python - learn note(1)
- Android Fragment原理及应用
- VS2010,VS2012,VS2015等的自动提示不能默认选中的功能解决办法