diff --git a/build/dep_globals.sh b/build/dep_globals.sh index 8477492..2ea636e 100644 --- a/build/dep_globals.sh +++ b/build/dep_globals.sh @@ -1,10 +1,11 @@ #!/bin/bash # author Oliver Blaser -# date 04.05.2022 +# date 12.05.2022 # copyright MIT - Copyright (c) 2022 Oliver Blaser versionstr=$(head -n 1 dep_vstr.txt) +prjDirName="rpihal" function ptintTitle() { @@ -15,3 +16,27 @@ function ptintTitle() echo -e "\033[3$2m --=====# \033[9$2m$1\033[3$2m #=====--\033[39m" fi } + +function writeReadmeFile() +{ + echo "" > $1 + echo " \$\$ \$\$\$" >> $1 + echo " \$\$ \$\$ \$\$\$" >> $1 + echo " \$\$ \$\$ \$\$" >> $1 + echo " \$\$ \$\$" >> $1 + echo "\$\$ \$\$\$\$\$ \$\$ \$\$\$\$\$ \$\$\$ \$\$ \$\$\$\$\$ \$\$\$\$\$ \$\$ \$\$" >> $1 + echo "\$\$\$\$\$\$\$\$\$ \$\$\$\$\$\$\$\$\$ \$\$\$ \$\$\$\$\$\$\$\$\$ \$\$\$\$\$\$\$\$\$ \$\$" >> $1 + echo "\$\$\$ \$\$\$ \$\$\$ \$\$\$ \$\$ \$\$\$ \$\$\$ \$\$\$ \$\$\$ \$\$" >> $1 + echo "\$\$ \$\$ \$\$ \$\$ \$\$ \$\$ \$\$ \$\$ \$\$" >> $1 + echo "\$\$ \$\$ \$\$ \$\$ \$\$ \$\$ \$\$ \$\$ \$\$" >> $1 + echo "\$\$ \$\$\$ \$\$\$ \$\$ \$\$ \$\$ \$\$\$ \$\$\$ \$\$" >> $1 + echo "\$\$ \$\$\$\$\$\$\$\$\$ \$\$\$\$ \$\$ \$\$ \$\$\$\$\$\$\$\$\$ \$\$\$\$" >> $1 + echo "\$\$ \$\$ \$\$\$\$ \$\$\$\$ \$\$ \$\$ \$\$\$\$\$ \$\$ \$\$\$\$" >> $1 + echo " \$\$" >> $1 + echo " \$\$" >> $1 + echo " \$\$ v$versionstr" >> $1 + echo "" >> $1 + echo "" >> $1 + echo "" >> $1 + echo "GitHub https://github.com/oblaser/rpihal/" >> $1 +} diff --git a/build/dep_vstr.txt b/build/dep_vstr.txt index 388bb06..d8cfec1 100644 --- a/build/dep_vstr.txt +++ b/build/dep_vstr.txt @@ -1 +1 @@ -0.1.0-alpha +0.1.0-rc diff --git a/build/pack_source.sh b/build/pack_source.sh new file mode 100644 index 0000000..27dc253 --- /dev/null +++ b/build/pack_source.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# author Oliver Blaser +# date 12.05.2022 +# copyright MIT - Copyright (c) 2022 Oliver Blaser + +source dep_globals.sh + +packedDir="./packed" +outDirName="${prjDirName}_src" +outDir="$packedDir/$outDirName" +archive="$packedDir/${prjDirName}_src_v$versionstr.tar.gz" + + + +rm -rf $outDir + +mkdir -p $outDir/$prjDirName +mkdir $outDir/$prjDirName/include +mkdir $outDir/$prjDirName/src + +cp -r ../include/* $outDir/$prjDirName/include +cp -r ../src/* $outDir/$prjDirName/src + +writeReadmeFile $outDir/$prjDirName/readme.txt +cp ../license.txt $outDir/$prjDirName + +rm -f $archive +tar -czf $archive -C $outDir $prjDirName diff --git a/build/readme.md b/build/readme.md index 79b3941..b728aa9 100644 --- a/build/readme.md +++ b/build/readme.md @@ -1,5 +1,7 @@ # Build Scripts +> `cmake` isn't set up yet, thus `build.sh` doesn't do something useful for now. + The scripts must have this directory as working directory. `dep_*` files are dependencies of the scripts and should not be called directly. @@ -20,5 +22,4 @@ Eexcept the `pack_*` scripts don't. ### files to edit on version update - `build/dep_vstr.txt` -- ~~`build/dep_readme.txt`~~ -- `include/rpihal/defs.h.h` +- `include/rpihal/defs.h` diff --git a/include/rpihal/defs.h b/include/rpihal/defs.h index 0ce5e2e..da3612e 100644 --- a/include/rpihal/defs.h +++ b/include/rpihal/defs.h @@ -15,7 +15,7 @@ extern "C" { #define RPIHAL_VERSION_MAJOR 0 #define RPIHAL_VERSION_MINOR 1 #define RPIHAL_VERSION_PATCH 0 -#define RPIHAL_VERSION_PRERELEASE "alpha" +#define RPIHAL_VERSION_PRERELEASE "rc" #define RPIHAL_VERSION_ISPRERELEASE 1 diff --git a/readme.md b/readme.md index 594b554..9264161 100644 --- a/readme.md +++ b/readme.md @@ -1,22 +1,26 @@ -# Raspberry Pi Hardware Abstraction Layer +# raspihal -Not completed. Grows as I need it. +A Raspberry Pi Hardware Abstraction Layer for C/C++ projects. +> Not completed. Grows as I need it. -# GPIO Module -> __CAUTION!__ Currently only supports models with the _~~BCM283x~~_ BCM2836 and BCM2837. Be aware of the different header pinouts on the various boards! +## GPIO Module -> __CAUTION!__ look for _DEVICE SPECIFIC_ or _DEVSPEC_ comments in code. +> __CAUTION!__ Currently only supports models with the BCM2836, BCM2837 and BCM2837B0. _~~BCM283x. Be aware of the different header pinouts on the various boards!~~_ +> +> Search for _DEVSPEC_ comments in code to find the critical portions. -Supported Models: -- 2B -- 3A+ -- 3B -- 3B+ +### Supported Models: +`2B` +`3A+` +`3B` +`3B+` -## Links +These all have the 40 pin header, which has the same pinout on all models listed above. + +### Links - https://elinux.org/RPi_GPIO_Code_Samples - https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#general-purpose-io-gpio diff --git a/release-notes.md b/release-notes.md index df2cc18..fcb39f3 100644 --- a/release-notes.md +++ b/release-notes.md @@ -2,7 +2,9 @@ -### v0.1.0 +### v0.1.0-rc +New - init pin as IN, OUT or AF - read and write I/O pin + - Serial/UART library