GPIO端口:P28  (即P2_8)寄存器地址:0x50003056

通过对底层 P2_8 的控制。

DA14580 底层IO操作

 

 

 

如:GPIO_SetPinFunction   P2_8 为 Output

SetWord16(0x50003056, 0x0300);      //GPIO_SetPinFunction   P2_8

意为设置16位寄存器0x50003056的值为0x0300,   即可配置 P2_8 为输出。

 

 

 

 

附:

SetWord16的定义

    #define SetWord8(a,d)       (* ( volatile uint8*) (a)=(d) )
    #define SetWord16(a,d)      (* ( volatile uint16*)(a)=(d) )
    #define SetWord32(a,d)      (* ( volatile uint32*)(a)=(d) )
    #define SetWord64(a,d)      (* ( volatile uint64*)(a)=(d) )

 

相关文章:

  • 2021-11-30
  • 2021-06-26
  • 2021-09-26
  • 2022-12-23
  • 2021-08-10
  • 2021-11-20
猜你喜欢
  • 2022-01-17
  • 2021-11-04
  • 2023-01-08
  • 2021-12-09
  • 2021-10-05
  • 2021-10-16
  • 2021-07-08
相关资源
相似解决方案