da14580

DA14580之GPIO口的使用

大憨熊 提交于 2020-01-28 16:52:22
SDK版本:5.0.4 开发环境:Keil 芯片:DA14580 作者:Asam         DA14580的gpio使用十分简单,只需调用其SDK自带的库函数即可。       (1)IO口初始化函数 1 /** 2 **************************************************************************************** 3 * @brief Combined function to set the state and the type and mode of the GPIO pin 4 * 5 * @param[in] port GPIO port 6 * @param[in] pin GPIO pin 7 * @param[in] mode GPIO pin mode. INPUT = 0, INPUT_PULLUP = 0x100, INPUT_PULLDOWN = 0x200, OUTPUT = 0x300, 8 * @param[in] function GPIO pin usage. GPIO_FUNCTION enumaration. 9 * @param[in] high set to TRUE to set the pin into high else low 10 * 11 *

ble da14580资料收集

最后都变了- 提交于 2020-01-15 09:41:40
低功耗休眠模式: 1 转自: https://blog.csdn.net/sinat_23338865/article/details/83790023 睡眠代码:app_default_sleep_mode = ARCH_EXT_SLEEP_ON;arch_set_sleep_mode(app_default_sleep_mode);user_s ​​睡眠代码: app_default_sleep_mode = ARCH_EXT_SLEEP_ON; arch_set_sleep_mode(app_default_sleep_mode); user_scheduler_reinit(); 1、DA14580在睡眠之前需要将app_default_sleep_mode定义为相应的睡眠模式; 2、调用arch_set_sleep_mode()使设备进入睡眠模式; 唤醒代码: if (GetBits16(SYS_STAT_REG, PER_IS_DOWN)) { periph_init(); } app_default_sleep_mode = ARCH_SLEEP_OFF; arch_set_sleep_mode(app_default_sleep_mode); arch_ble_force_wakeup(); app_easy_wakeup(); a、唤醒外设 b、关闭睡眠模式 c