重定位函数在generate compiler里面
devlink驱动封装里面gs_mount_table 里stdio open函数控制外围;
open herity是个好东西
io滚动条右滑
s![
![](https://img-blog.csdnimg.cn/20200826095052787.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NDczNzkyMg==,size_16,color_FFFFFF,t_70#pic_center)
io要双击设置
osless用的是定时器中断
组件没加,添加组件要下载
遇到版本问题
osless点灯灯
右键修改cpg和ostm_reserved版本,问题解决

点灯流程如下:
smart configuration里面开gpio,开定时器(在component 添加ostm,设置计数值和回调函数名)
定义句柄
static int_t gs_my_gpio_handle;
句柄赋值
gs_my_gpio_handle = direct_open(“gpio”, 0);
然后在定时器的回调函数里面调用
direct_control(gs_my_gpio_handle, CTL_GPIO_PIN_WRITE, &gs_p60_hi);和direct_control(gs_my_gpio_handle, CTL_GPIO_PIN_WRITE, &gs_p60_lo);,形成blink效果

注意定时器也要打开
int_t ostm_handle;
ostm_handle = direct_open(“ostm0”, 0);
direct_control(ostm_handle, CTRL_OSTM_START_TIMER, NULL);

结构体:
static st_r_drv_gpio_pin_rw_t gs_p60_hi =
{
GPIO_PORT_6_PIN_0,
GPIO_LEVEL_HIGH,
GPIO_SUCCESS
};

static st_r_drv_gpio_pin_rw_t gs_p60_lo =
{
GPIO_PORT_6_PIN_0,
GPIO_LEVEL_LOW,
GPIO_SUCCESS
};
osless点灯灯
osless点灯灯
但是自己建的工程还是不行
用压缩包示例文件
osless点灯灯
debug configuration设置就好了
修改定时器,ok
配另一个灯
osless点灯灯

相关文章:

  • 2021-12-25
  • 2022-01-01
  • 2021-11-03
  • 2021-06-30
  • 2022-12-23
  • 2023-02-04
  • 2021-05-30
  • 2021-09-01
猜你喜欢
  • 2021-12-26
  • 2021-10-14
  • 2021-08-14
  • 2022-01-18
  • 2022-12-23
  • 2022-01-13
相关资源
相似解决方案