first : In the process of Hongmeng system driven development , First of all, we should know how the driver framework is laid out , Hongmeng system provides developers with the ability of driving framework , Including driver loading , Drive service management and drive message mechanism . This is also for , Build a driver architecture platform , Provide more accurate information for driving developers , Efficient development environment , Strive to achieve one-time development , Multi system deployment .

the second : Driving model

HDF The framework takes the component driven model as the core design idea , Provide more refined driver management for developers , Make driver development and deployment more standardized .

Third : Hardware code implementation

Drive add :

The driver configuration is divided into two parts ——HDF Driver device description defined by the framework and private configuration information of the driver

HCS(HDF Drive frame configuration description )




  The private configuration file stores the private configuration information of the driver

  Driving service management mechanism :

Driving service publishing policy :policy by 2 Indicates that the driver publishes services in both kernel and user mode .

  Drive message mechanism :


Fourth :

Operation effect : Through control my_led 0 Turn off the lights    my_led 1 Turn on the corresponding light

summary : and linux Drive control is similar , The user program cannot directly access the driver , Only drivers are exposed to the user state server after , User program can pass Dispatch Send instructions to the driver , And can transfer the data of user status to the driver .

More practice can go further .