The peripheral devices of the ATM include card readers, cryptographic keyboards, and flow printers. they interact with the ATM host through the serial port to implement the communication between the host and the peripheral devices.ProgramThe driver library is called, and the software on the screen of the user's ATM machine is the application layer. The application layer calls the driver library to implement various functions of the ATM.
In this mode, Project Division issues often occur: Are some functions stored at the application layer or on the driver layer? The company's developers will face these issues.
In fact, the driver layer only needs to implement simple operations, such as hardware initialization, data transmission, hardware shutdown, card reading, card return, and so on... the logic functions should be implemented at the application layer. For example, when the card will be returned and when the card cannot be entered ..
An image metaphor: The driver layer is a knife, and the application layer is a knife user. This simply implements the cutting function, and this tool is used as a small Li Fei knife, the user (Application Layer) needs to be fully regarded ).