This library contains a collection of utilities and helpful functions, data structures, macros, etc.
Include the headers like: #include <md407/debug.h
, and link the desired stuff.
#include <md407/gpio.h>
#include <md407/time.h>
#include <md407/debug.h>
int main() {
// Set pins 7-15 as outputs.
GPIO_E->moder_high = 0x5555;
// Delay for 1 second.
delay_milli(1000);
// Write 'E' to the output.
GPIO_E->odr_high = 'E';
// Print a text to USART1 for debug.
printc("Hello World!\n");
return 0;
}
Pick your system OS and follow the instructions:
The destination directory (DESTDIR
) should be /usr/arm-none-eabi
on Linux (maybe the same for other *NIX... I haven't checked). If that does not work then do:
$ make DESTDIR=(your dir here) install
.
git clone https://github.com/pythar-chalmers/libmd407 && cd libmd407 && sudo make install
Otherwise just copy-paste the above into your terminal and press enter.
- Go to this website and then install the recommended distribution.
- Come back here and read the above.
This project is licensed under the GNU v2 License - see the LICENSE file for details