Skip to content

Commit bac1907

Browse files
committed
updated some documentation
1 parent 9460180 commit bac1907

File tree

2 files changed

+35
-17
lines changed

2 files changed

+35
-17
lines changed

README.md

+25-13
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
1-
# LibMcuLL
2-
This repository contains the microcontroller lowlevel library, called libMcuLL. It is a inspired by many microcontroller vendor libraries like LPCopen, STM32 LL drivers and many many more. The biggest problem is that they are locked behind various tools and instead of installing many graphical tools that download various zip files I just want to get at the register definitions. Next to that, these libraries are sometimes bloated and a bit inefficient, so lets reinvent the wheel ;-).
1+
# LibMcu
2+
This repository contains a set of libraries for usage on various microcontrollers. It is inspired by many microcontroller vendor libraries like LPCopen, STM32 LL drivers and many many more. The biggest problem is that they are locked behind various tools and instead of installing graphical tools that download various zip files I just want to get at the register definitions. Next to that, these libraries are can be big and inefficient, so lets reinvent the wheel ;-).
3+
All of these libraries are written in C++20.
4+
This library encompasses three separate libraries:
5+
* LibMcuLL: Contains low level routines that expose as much as the microcontroller functionality with a specific API
6+
* LibMcuHal: Contains low level routines that expose some of the microcontroller functionality but with a common interface that should be the same across all supported microcontrollers
7+
* LibMcuDriver: Contains drivers using the LibMcuHal classes so are usable across all microcontroller families.
38
# Usage
49
To use this project add the inc directory of this repository to your project and to access the register definitions define the microcontroller with a preprocessor define in the shape of ```MCU_DEVICECODE```. See the appropriate header for supported controller. Word of warning, that it is defined there does not mean the support is by any means complete. I tend to add register definitions/features when I need them at that moment, yes this is annoying but feel free to contribute if you are missing something.
5-
## Minimal usage example in C
10+
## Uusage example in C++
11+
Just include the microcontroller specific library with the proper postfix notation for HAL or LL library. For example including the RP2040 LL library:
612
```
7-
// TODO add your configuration options here
8-
#include <mcu_ll.h>
13+
// Before inclusion add your clocking configuration in #defines, this will change in the future by using a proper configuration structure
14+
#include <libmcuRP2040ll.hpp>
915
```
10-
## Minimal usage example in C++
16+
If you want to use the HAL library:
1117
```
12-
// TODO add your configuration options here
13-
#include <mcu_ll.hpp>
18+
// Before inclusion add your clocking configuration in #defines, this will change in the future by using a proper configuration structure
19+
#include <libmcuRP2040hal.hpp>
1420
```
21+
The drivers are located in the ```drivers```
1522
## Design documents
1623
* How to add a microcontroller (TODO)
1724
* Hardware in the loop tests (TODO)
1825
* [include architecture](doc/includes.md)
19-
* [C Coding guidelines](doc/C_coding_guidelines.md)
2026
* [C++ Coding guidelines](doc/CPP_coding_guidelines.md)
21-
* [C++ namespacing](doc/CPP_namespaces.md)
22-
* C++ anatomy of a peripheral hardware definition (TODO)
23-
* C++ anatomy of a peripheral software definition (TODO)
27+
* [namespacing](doc/CPP_namespaces.md)
28+
* design of a low level peripheral hardware definition (TODO)
29+
* design of a low level peripheral software definition (TODO)
30+
* design of a HAL peripheral definition (TODO)
31+
* design of a driver (TODO)
2432
# Goals
25-
For version 0.1 I intend to support the all the LPC812 peripherals with some functionality to make some applications. Not all features will be supported on all peripherals.
33+
Support is based on the microcontrollers I use the most, support is spotty as this library is still in development. Peripheral support is based on a first use basis.
34+
* NXP LPC8 series like the LPC81X, LPC82X, LPC80X, LPC84X, LPC11XX
35+
* STM32F0 STM32G0 STM32C0 STM32F4 STM32F7
36+
* RP2040
37+
I add support for peripherals on a project by project need basis. I use this library mostly as a learning vehicle for using modern C++. If you have a need, feel free to submit a pullrequest.

doc/CPP_namespaces.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
# C++ LibMcuLL namespaces
2-
C++ LibMcuLL uses namespaces to group various definitions.
3-
* ```libMcuLL``` is the top level namespace that contains LibMcuLL types and helper classes
1+
# C++ libMcu namespaces
2+
C++ libMcu uses namespaces to group various definitions.
3+
* ```libMcu``` contains types, definitions and helper classe used libMcu wide
4+
* ```libMcuLL``` is the top level namespace that contains libMcuLL types and helper classes
45
* ```hw``` contains hardware definitions like the peripheral addresses
56
* ```peripheral``` contains the defintions for this peripheral
67
* ```REGISTER``` contains the defintions for this peripheral register
7-
* ```sw``` contains software definitions like classes, enums used as method arguments
8+
* ```sw``` contains software definitions like peripheral control classes, enums used as method arguments
9+
* ```libMcuHal``` is the top level namespace that contains libMcuHal types and helper classes
10+
* ```peripheral``` contains the HAL control class for this peripheral. The class name is the same as the namespace name
11+
* ```libMcuDriver``` is the top level namespace that contain libMcuDriver types and helper classes
12+
* ```driver``` contains the driver control class. The class name is the same as the namespace name
13+

0 commit comments

Comments
 (0)