aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-08-14 18:10:06 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-08-14 18:10:06 +0000
commit023c9515e432b94ec4a71b563729f03cc3e1d381 (patch)
treefc6c32af6e7ce735b3397d848054f691b0b416ad /tools
parentbfa1ba111db2b1f1366b6b33dbd0cf8ff86b5733 (diff)
downloadChibiOS-023c9515e432b94ec4a71b563729f03cc3e1d381.tar.gz
ChibiOS-023c9515e432b94ec4a71b563729f03cc3e1d381.tar.bz2
ChibiOS-023c9515e432b94ec4a71b563729f03cc3e1d381.zip
Added simple script for massive file changes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4571 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'tools')
-rwxr-xr-xtools/edit_aid/rebalance_prio.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/edit_aid/rebalance_prio.sh b/tools/edit_aid/rebalance_prio.sh
new file mode 100755
index 000000000..c831684b8
--- /dev/null
+++ b/tools/edit_aid/rebalance_prio.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+FILES=`find -name 'mcuconf.h'`
+for i in $FILES
+do
+ cp $i ${i}_backup
+ cat ${i}_backup | \
+ sed -e 's/\(#define STM32_I2C_I2C[0-9]_IRQ_PRIORITY\)\([ ]*\)\([0-9]*\)/\1\25/' | \
+ sed -e 's/\(#define STM32_I2C_I2C[0-9]_DMA_PRIORITY\)\([ ]*\)\([0-9]*\)/\1\23/' | \
+ sed -e 's/\(#define STM32_ADC_IRQ_PRIORITY\)\([ ]*\)\([0-9]*\)/\1\26/' | \
+ sed -e 's/\(#define STM32_ADC_ADC[0-9]_IRQ_PRIORITY\)\([ ]*\)\([0-9]*\)/\1\26/' | \
+ sed -e 's/\(#define STM32_ADC_ADC[0-9]_DMA_IRQ_PRIORITY\)\([ ]*\)\([0-9]*\)/\1\26/' > $i
+ rm ${i}_backup
+done