The invention provides an implementation method for optimizing
chip GPIO (
General Purpose Input / Output) driving
software. The implementation method based on
chip GPIO drive
software optimization comprises the following steps that S1,
software reads definition description of a pin, S2, a user selects corresponding function configuration, S3, the software reads the corresponding function configuration and the pin definition description selected by the user, S4, the software analyzes the pin definition description and the function configuration in a program S3 through the pin configuration, and S5, the
chip GPIO drive software is obtained. And generating pin configuration parameters according to the defined rule. According to the method, traditional driving software is divided into two parts, a
function definition part is stripped, the complexity of the driving software is reduced, the flexibility of the software is improved, and the size of a code is reduced, according to the method provided by the invention, initially configured parameters are generated by a tool of a PC (
Personal Computer) end, and the driving software only configures the parameters into a chip, so that the cost is reduced; corresponding codes do not need to be contained, and after configuration parameterization, driving software does not need to distinguish application scenes, so that the method is more universal.