Reusable Firmware Development
Reusable Firmware Development: A Practical Approach to APIs, HALs and Drivers by Jacob Beningo (Apress, 2017)
Nội dung
Chương 1: Khái niệm lập trình Portable Firmware
- 1. Tại sao tái sử dụng code lại quan trọng
- 2. Portable Firmware
- 3. Sự Module hóa
- 4. Module Coupling và Cohesion
- 5. Tuân theo một Tiêu chuẩn
- 6. Portability Issues in C—Data Types
- 7. Portability Issues in C—Structures and Unions
- 8. Portability Issues in C—Bit Fields
- 9. Portability Issues in C—Preprocessor Directives
- 10. Embedded-Software Architecture
- 11. Hardware Abstraction Layers (HAL)
- 12. Application Programming Interfaces (APIs)
- 13. Tổ chức dự án
- 14. Getting Started Writing Portable Firmware
- 15. Đi xa hơn
Chương 2: Nguyên lý cơ bản API và HAL
- 1. The Wonderful World of HALs
- 2. APIs Versus HALs
- 3. The API and HAL Landscape
- 4. The Good, Bad, and Ugly
- 5. Potential Issues and the Boogeyman
- 6. Characteristics Every HAL Should Exhibit
- 7. Evaluating HAL Characteristics
- 8. To Build or Not to Build
- 9. A First Look at a HAL
- 10. The API Scope
- 11. API Characteristics to Look For
- 12. Designing Your Own APIs
- 13. A First Look at an API
- 14. Wrapping APIs
- 15. Why Design Your Own APIs and HALs?
- 16. Comparing APIs and HALs
- 17. Going Further
Chương 3: Device Driver Fundamentals in C
- 1. Hiểu về Memory Map
- 2. Planning the Driver Interfaces
- 3. Design by Contract
- 4. Assertion Fundamentals
- 5. Device Driver Models
- 6. Polling Versus Interrupt-Driven Drivers
- 7. Driver Component Definition
- 8. Naming Convention Recommendations
- 9. Object-Oriented Programming in C
- 10. Abstractions and Abstract Data Types (ADTs)
- 11. Encapsulation and Data Hiding
- 12. Callback Functions
- 13. Error Handling
- 14. Leverage Design Patterns
- 15. Expected Results and Recommendations
- 16. Going Further
Chương 4: Writing Reusable Drivers
- 1. Reusable Drivers
- 2. Giải Mã Từ Khóa extern và static
- 3. Giải Mã Từ Khóa volatile
- 4. Giải Mã Từ Khóa const
- 5. Memory-Mapping Methodologies
- 6. Tổng quan về cách tạo Timer Driver
- Step #1: Define the Timer’s Configuration Table
- Step #2: Define the Timer’s Peripheral Channels
- Step #3: Populate the Timer’s Configuration Table
- Step #4: Create the Timer’s Pointer Arrays
- Step #5: Create the Initialization Function
- Step #6: Fill in the Timer Driver Interface
- Step #7: Maintain and Port the Design Pattern
- 7. Chọn cách Implement Driver Phù hợp
- 8. Going Further – Thực hành