Skip to content

pythar-chalmers/libmd407

Repository files navigation

MD407 Utils Library

This library contains a collection of utilities and helpful functions, data structures, macros, etc.

Usage

Include the headers like: #include <md407/debug.h, and link the desired stuff.

Example

#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;
}

Installation

Pick your system OS and follow the instructions:

*NIX (Linux, MacOS, ...)

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.

Windows

Option A
  1. Go to this website and then install the recommended distribution.
  2. Come back here and read the above.
Option B
You're on your own lol

Authors

License

This project is licensed under the GNU v2 License - see the LICENSE file for details