Other ETH lib

This commit is contained in:
Patrick Schwarz 2024-11-09 21:59:25 +01:00
parent 3ce1df2136
commit c295017495
70 changed files with 21645 additions and 67 deletions

View file

@ -0,0 +1,70 @@
# Code formatting rules for Arduino libraries, modified from for KH libraries:
#
# https://github.com/arduino/Arduino/blob/master/build/shared/examples_formatter.conf
#
# astyle --style=allman -s2 -t2 -C -S -xW -Y -M120 -f -p -xg -H -xb -c --xC120 -xL *.h *.cpp *.ino
--mode=c
--lineend=linux
--style=allman
# -r or -R
#--recursive
# -c => Converts tabs into spaces
convert-tabs
# -s2 => 2 spaces indentation
--indent=spaces=2
# -t2 => tab =2 spaces
#--indent=tab=2
# -C
--indent-classes
# -S
--indent-switches
# -xW
--indent-preproc-block
# -Y => indent classes, switches (and cases), comments starting at column 1
--indent-col1-comments
# -M120 => maximum of 120 spaces to indent a continuation line
--max-continuation-indent=120
# -xC120 => maxcodelength will break a line if the code exceeds # characters
--max-code-length=120
# -f =>
--break-blocks
# -p => put a space around operators
--pad-oper
# -xg => Insert space padding after commas
--pad-comma
# -H => put a space after if/for/while
pad-header
# -xb => Break one line headers (e.g. if/for/while)
--break-one-line-headers
# -c => Converts tabs into spaces
#--convert-tabs
# if you like one-liners, keep them
#keep-one-line-statements
# -xV
--attach-closing-while
#unpad-paren
# -xp
remove-comment-prefix

View file

@ -0,0 +1,6 @@
#!/bin/bash
for dir in . ; do
find $dir -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.ino" \) -exec astyle --suffix=none --options=./utils/astyle_library.conf \{\} \;
done