Add readme.
This commit is contained in:
parent
deaba9dbcb
commit
02eb962c23
6
Makefile
6
Makefile
@ -1,6 +1,6 @@
|
||||
CROSS_COMPILE ?=
|
||||
|
||||
TARGET_FILE ?= distance_app
|
||||
TARGET_FILE ?= voltage_app
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CPP = $(CROSS_COMPILE)cpp
|
||||
@ -16,7 +16,7 @@ UNIT_TEST_SRC_DIR = test/unit
|
||||
UNIT_TEST_OBJ_DIR = $(OBJ_DIR)/$(UNIT_TEST_SRC_DIR)
|
||||
|
||||
PREFIX ?= /usr
|
||||
BIN_INSTALL_DIR ?= $(PREFIX)/bin/$(TARGET_FILE)
|
||||
BIN_INSTALL_DIR = $(PREFIX)/bin
|
||||
|
||||
INCLUDES := inc
|
||||
INCLUDES += $(PREFIX)/include/
|
||||
@ -57,7 +57,7 @@ all: $(TARGET)
|
||||
|
||||
install: all
|
||||
install -d $(BIN_INSTALL_DIR)
|
||||
install -m 0644 $(TARGET) $(BIN_INSTALL_DIR)
|
||||
install -m 0666 $(TARGET) $(BIN_INSTALL_DIR)
|
||||
|
||||
uninstall:
|
||||
rm -f $(BIN_INSTALL_DIR)/$(TARGET_FILE)
|
||||
|
67
README.md
Normal file
67
README.md
Normal file
@ -0,0 +1,67 @@
|
||||
# Voltage app
|
||||
|
||||
Application to read out voltages from ads1115 adc-i2c ad converter.
|
||||
|
||||
## Dependencies
|
||||
|
||||
* `gpio_sys`: <https://git.blackfinn.de/adc_gpio_i2c/gpio_sys>
|
||||
* `i2c_bb`: <https://git.blackfinn.de/adc_gpio_i2c/i2c_bb>
|
||||
* `ads1115`: <https://git.blackfinn.de/adc_gpio_i2c/ads1115>
|
||||
|
||||
## Installation
|
||||
|
||||
```shell
|
||||
make install
|
||||
```
|
||||
|
||||
Installs `voltage_app` into the directory `$(PREFIX)/bin/`. The default value for `PREFIX` is: `PREFIX=/usr`. To use another location for installation changing the value of the `PREFIX` variable is needed. E.g.:
|
||||
|
||||
```shell
|
||||
PREFIX=/usr/local/ make install
|
||||
```
|
||||
|
||||
## Uninstallation
|
||||
|
||||
```shell
|
||||
make uninstall
|
||||
```
|
||||
|
||||
Removes the files installed with the `install` make target.
|
||||
> **NOTE:** If `PREFIX` variable was changed during installation process the same value needs to be set for uninstallation. E.g.:
|
||||
|
||||
```shell
|
||||
PREFIX=/usr/local/ make uninstall
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```shell
|
||||
$ distance_app
|
||||
Conversation: 3.196V (0x4293).
|
||||
Conversation: 3.199V (0x42a7).
|
||||
Conversation: 3.192V (0x4282).
|
||||
Conversation: 3.186V (0x4261).
|
||||
Conversation: 3.183V (0x424e).
|
||||
Conversation: 3.185V (0x425b).
|
||||
Conversation: 3.178V (0x4236).
|
||||
Conversation: 3.178V (0x4235).
|
||||
Conversation: 3.190V (0x4275).
|
||||
Conversation: 3.181V (0x4243).
|
||||
Conversation: 3.178V (0x4235).
|
||||
^CSignal catched: 2
|
||||
Shutting down...
|
||||
```
|
||||
|
||||
## Additional make targets
|
||||
|
||||
| Target | Meaning |
|
||||
| --------------- | ------------------------------------------------- |
|
||||
| all | Build the code, link the application executable. |
|
||||
| install | Install the application executable. |
|
||||
| uninstall | Uninstall the application executable. |
|
||||
| clean | Clean up build artifacts. |
|
||||
| distclean | Remove all folders created during any build step. |
|
||||
| build_unit_test | Build the unit tests. |
|
||||
| exec_unit_test | Execute the unit tests. |
|
||||
| coverage | Determine code coverage of the unit tests. |
|
||||
| check | Static code analysis (cppcheck). |
|
Loading…
Reference in New Issue
Block a user