The key initialization function keys_init() is developed on the basic library. The initialization function is encapsulated in Init() . We don’t need to initialize again, but we must remember that before using each peripheral, we need to initialize the corresponding pin.