1632 views|2 replies

58

Posts

1

Resources
The OP
 

[Raspberry Pi Pico Review] 3. My first project [Copy link]

 

After the previous preparation, the basic knowledge is almost known, and you can start to build your own project. The basic operation method will not be explained in detail, and the picture will be directly posted as a reference. Because my plan is to encapsulate it into a class library instead of running routines, I will explain the structure and usage of the library. It has been synchronized to https://gitee.com/tjCFeng/PicoRPI, welcome to correct. In addition, the original author encapsulated the corresponding RP2040 series of boards, just like Arduino, which is tightly bound to each board, while I encapsulate the RP2040 chip, and do not specify the function of which pin, only complete the implementation process, and the pins are freely defined.

[attach ]532077[/attach]

After the project is created, go to https://gitee.com/tjCFeng/PicoRPI/Driver. This folder contains various peripheral libraries of RP2040, the most basic of which is the HAL.pp file.

This file implements the initialization of RP2040, such as clock configuration, and defines IO ports and various multiplexing functions. Delphi's habit is to define with T, so Pin and Alternate Function are defined as TPIN and TAF, and all other units will be used and put in this common file. The class definition should also start with T, but in order to be consistent with my previous library, it starts with C, indicating class, and HW is Hardware.

CHW is a singleton class, which can only be initialized once in its entire life cycle. Even if it is initialized repeatedly, it returns a unique instance. The usage method is CHW.Instance.xxxxxx(). The initialization of this class has been completed in the last initialization of the file, so there is no need to write code manually. The initialization is completed when the program starts. Other functions are class methods, which are static functions and are directly called through CHW.xxxxxx().

Since this file is generally not called by users, it is to provide basic functions for other peripherals, so I will briefly introduce it. And it is not perfect yet, and there will definitely be changes in the future, so please pay attention to https://gitee.com/tjCFeng/PicoRPI. (The name of PicoRPI is also going to be changed to RP2040, we will talk about it later.)

11.png (14 KB, downloads: 0)

11.png

Latest reply

Come on, keep on going~   Details Published on 2021-4-9 10:26
 
 

71

Posts

2

Resources
2
 

Come on, keep on going~

Comments

Thanks for your support  Details Published on 2021-4-9 10:46
 
 
 

58

Posts

1

Resources
3
 
Albert.G posted on 2021-4-9 10:26 Come on, keep on going~

Thanks for your support

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list