Compare commits
No commits in common. 'dev_pinconfig' and 'master' have entirely different histories.
dev_pincon
...
master
@ -1,16 +0,0 @@
|
|||||||
#!/usr/bin/gawk -f
|
|
||||||
|
|
||||||
BEGIN {
|
|
||||||
printf("#ifndef __GITDEFS_H__\n")
|
|
||||||
printf("#define __GITDEFS_H__\n\n")
|
|
||||||
printf("/* Do not edit this file */\n")
|
|
||||||
printf("/* Automatic generated by gitinfo.awk */\n\n\n")
|
|
||||||
}
|
|
||||||
|
|
||||||
NR == 1 { printf("#define GIT_HASH_STR \"%s\"\n", $0); }
|
|
||||||
NR == 2 { printf("#define GIT_HASH_HEX 0x%s\n", $0); }
|
|
||||||
NR == 3 { printf("#define GIT_BRANCH_STR \"%s\"\n", $0); }
|
|
||||||
NR == 4 { printf("#define GIT_VERSION_STR \"%s\"\n", $0); }
|
|
||||||
NR == 5 { printf("#define GIT_BUILD_NR %u\n", $0);
|
|
||||||
printf("#define GIT_BUILD_STR \"%s\"\n", $0); }
|
|
||||||
END { printf("\n\n#endif\n\n"); }
|
|
@ -1,81 +0,0 @@
|
|||||||
#ifndef __PINCFG_H__
|
|
||||||
#define __PINCFG_H__
|
|
||||||
|
|
||||||
typedef enum: uint8_t {
|
|
||||||
PIN_MODE_DIG_IN = 0,
|
|
||||||
PIN_MODE_ANA_IN,
|
|
||||||
PIN_MODE_DIG_OUT,
|
|
||||||
PIN_MODE_ANA_OUT,
|
|
||||||
PIN_MODE_UNUSED = 0xFF
|
|
||||||
} PIN_MODES;
|
|
||||||
|
|
||||||
typedef enum: uint8_t {
|
|
||||||
PULLUP_OFF,
|
|
||||||
PULLUP_ON
|
|
||||||
} PULLUP_MODES;
|
|
||||||
|
|
||||||
typedef enum: uint8_t {
|
|
||||||
EDGE_RISING,
|
|
||||||
EDGE_FALLING
|
|
||||||
} EDGE_POLARITY;
|
|
||||||
|
|
||||||
typedef enum: uint8_t {
|
|
||||||
MIDI_CMD_SNAPSHOT = 0, // call snapshot
|
|
||||||
MIDI_CMD_FADER_ABS, // direct set fader value
|
|
||||||
MIDI_CMD_FADER_REL, // inc/dec fader value
|
|
||||||
MIDI_CMD_MUTE, // direct set mute state
|
|
||||||
MIDI_CMD_MUTE_TOGGLE, // toggle mute state
|
|
||||||
MIDI_CMD_PAN, // direct set panorama
|
|
||||||
MIDI_CMD_NONE = 0xFF // no command assigned
|
|
||||||
} MIDI_CMD_TYPES;
|
|
||||||
|
|
||||||
struct MidiSelVal {
|
|
||||||
uint8_t chsel; // control element select (channel ID)
|
|
||||||
uint8_t val; // value of control element
|
|
||||||
};
|
|
||||||
|
|
||||||
struct MidiFaderRel {
|
|
||||||
uint8_t chsel; // fader chan ID
|
|
||||||
int8_t step; // step size (neg:downward, pos:upward)
|
|
||||||
uint8_t min; // lowest fader value
|
|
||||||
uint8_t max; // highest fader value
|
|
||||||
};
|
|
||||||
|
|
||||||
struct MidiMute {
|
|
||||||
uint8_t chsel; // mute chan ID
|
|
||||||
uint8_t edgecfg; // -1:
|
|
||||||
};
|
|
||||||
|
|
||||||
union MidiCmdCfg {
|
|
||||||
uint8_t Snapshot;
|
|
||||||
MidiSelVal FaderAbs;
|
|
||||||
MidiSelVal Mute;
|
|
||||||
MidiSelVal Pan;
|
|
||||||
MidiFaderRel FaderRel;
|
|
||||||
MidiMuteToggle MuteToggle;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct PinCfg {
|
|
||||||
uint8_t PinSel;
|
|
||||||
PIN_MODES Mode;
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
PULLUP_MODES Pullup;
|
|
||||||
MIDI_CMD_TYPES MidiCmd;
|
|
||||||
} CfgDigIn;
|
|
||||||
struct {
|
|
||||||
uint8_t todo;
|
|
||||||
} CfgAnaIn;
|
|
||||||
struct {
|
|
||||||
uint8_t todo;
|
|
||||||
} CfgDigOut;
|
|
||||||
struct {
|
|
||||||
uint8_t todo;
|
|
||||||
} CfgAnaOut;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
git describe --abbrev=8 --dirty --always > gitinfo.txt
|
|
||||||
git describe --abbrev=8 --always >> gitinfo.txt
|
|
||||||
git rev-parse --abbrev-ref HEAD >> gitinfo.txt
|
|
||||||
git describe --always --tags --dirty=-d | gawk 'NR==1{print $0}' >> gitinfo.txt
|
|
||||||
git rev-list HEAD | wc -l | tr -d ' ' >> gitinfo.txt
|
|
||||||
gawk -f gitinfo.awk < gitinfo.txt > gitdefs.h
|
|
||||||
rm -f gitinfo.txt
|
|
@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/gawk -f
|
|
||||||
|
|
||||||
# Execute for every lines
|
|
||||||
{
|
|
||||||
umlkey = "//u ";
|
|
||||||
pos = index($0, umlkey);
|
|
||||||
if (pos) {
|
|
||||||
print substr($0, pos + length(umlkey))
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue