Skip to content

Commit

Permalink
[scripts] add missing renames in i2c functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rroohhh committed Aug 9, 2020
1 parent e9f5459 commit 8e2d40d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 40 deletions.
20 changes: 10 additions & 10 deletions software/scripts/axiom_i2c.func
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,41 @@ axiom_i2c_set() {
}

axiom_i2c_bit_get() {
val=`i2c_get $1 $2`
val=`axiom_i2c_get $1 $2`
msk=`bit_msk $3`
bit=$(( (val & msk) >> $3 ))
printf "%d" $bit
return $bit
}

axiom_i2c_bit_set() {
val=`i2c_get $1 $2`
val=`axiom_i2c_get $1 $2`
msk=`bit_msk $3`
val=$(( val | msk ))
i2c_set $1 $2 $val
axiom_i2c_set $1 $2 $val
}

axiom_i2c_bit_clr() {
val=`i2c_get $1 $2`
val=`axiom_i2c_get $1 $2`
msk=`bit_msk $3`
val=$(( val & ~msk ))
i2c_set $1 $2 $val
axiom_i2c_set $1 $2 $val
}

axiom_i2c_map() {
val=`i2c_get $1 $2`
val=`axiom_i2c_get $1 $2`
val=`bit_map $val $3 $4 $5`
i2c_set $1 $2 $val
axiom_i2c_set $1 $2 $val
}

axiom_i2c_bit() {
[ -n "$4" ] && \
i2c_map $1 $2 $3 $3 $4 ||
i2c_bit_get $1 $2 $3
axiom_i2c_map $1 $2 $3 $3 $4 ||
axiom_i2c_bit_get $1 $2 $3
}

axiom_i2c_mbv() {
val=`i2c_get $1 $2`
val=`axiom_i2c_get $1 $2`
msk=`bit_msk $3 $4`
val=$(( (val & msk) >> $3 ))
printf "%d" $val
Expand Down
20 changes: 10 additions & 10 deletions software/scripts/axiom_i2c0.func
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,41 @@ axiom_i2c0_setw() {


axiom_i2c0_bit_get() {
val=`i2c0_get $1 $2`
val=`axiom_i2c0_get $1 $2`
msk=`bit_msk $3`
bit=$(( (val & msk) >> $3 ))
printf "%d" $bit
return $bit
}

axiom_i2c0_bit_set() {
val=`i2c0_get $1 $2`
val=`axiom_i2c0_get $1 $2`
msk=`bit_msk $3`
val=$(( val | msk ))
i2c0_set $1 $2 $val
axiom_i2c0_set $1 $2 $val
}

axiom_i2c0_bit_clr() {
val=`i2c0_get $1 $2`
val=`axiom_i2c0_get $1 $2`
msk=`bit_msk $3`
val=$(( val & ~msk ))
i2c0_set $1 $2 $val
axiom_i2c0_set $1 $2 $val
}

axiom_i2c0_map() {
val=`i2c0_get $1 $2`
val=`axiom_i2c0_get $1 $2`
val=`bit_map $val $3 $4 $5`
i2c0_set $1 $2 $val
axiom_i2c0_set $1 $2 $val
}

axiom_i2c0_bit() {
[ -n "$4" ] && \
i2c0_map $1 $2 $3 $3 $4 ||
i2c0_bit_get $1 $2 $3
axiom_i2c0_map $1 $2 $3 $3 $4 ||
axiom_i2c0_bit_get $1 $2 $3
}

axiom_i2c0_mbv() {
val=`i2c0_get $1 $2`
val=`axiom_i2c0_get $1 $2`
msk=`bit_msk $3 $4`
val=$(( (val & msk) >> $3 ))
printf "%d" $val
Expand Down
20 changes: 10 additions & 10 deletions software/scripts/axiom_i2c1.func
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,41 @@ axiom_i2c1_setw() {
}

axiom_i2c1_bit_get() {
val=`i2c1_get $1 $2`
val=`axiom_i2c1_get $1 $2`
msk=`bit_msk $3`
bit=$(( (val & msk) >> $3 ))
printf "%d" $bit
return $bit
}

axiom_i2c1_bit_set() {
val=`i2c1_get $1 $2`
val=`axiom_i2c1_get $1 $2`
msk=`bit_msk $3`
val=$(( val | msk ))
i2c1_set $1 $2 $val
axiom_i2c1_set $1 $2 $val
}

axiom_i2c1_bit_clr() {
val=`i2c1_get $1 $2`
val=`axiom_i2c1_get $1 $2`
msk=`bit_msk $3`
val=$(( val & ~msk ))
i2c1_set $1 $2 $val
axiom_i2c1_set $1 $2 $val
}

axiom_i2c1_map() {
val=`i2c1_get $1 $2`
val=`axiom_i2c1_get $1 $2`
val=`bit_map $val $3 $4 $5`
i2c1_set $1 $2 $val
axiom_i2c1_set $1 $2 $val
}

axiom_i2c1_bit() {
[ -n "$4" ] && \
i2c1_map $1 $2 $3 $3 $4 ||
i2c1_bit_get $1 $2 $3
axiom_i2c1_map $1 $2 $3 $3 $4 ||
axiom_i2c1_bit_get $1 $2 $3
}

axiom_i2c1_mbv() {
val=`i2c1_get $1 $2`
val=`axiom_i2c1_get $1 $2`
msk=`bit_msk $3 $4`
val=$(( (val & msk) >> $3 ))
printf "%d" $val
Expand Down
20 changes: 10 additions & 10 deletions software/scripts/axiom_i2c2.func
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,41 @@ axiom_i2c2_set() {
}

axiom_i2c2_bit_get() {
local val=`i2c2_get $1 $2`
local val=`axiom_i2c2_get $1 $2`
local msk=`bit_msk $3`
local bit=$(( (val & msk) >> $3 ))
printf "%d" $bit
return $bit
}

axiom_i2c2_bit_set() {
local val=`i2c2_get $1 $2`
local val=`axiom i2c2_get $1 $2`
local msk=`bit_msk $3`
val=$(( val | msk ))
i2c2_set $1 $2 $val
axiom_i2c2_set $1 $2 $val
}

axiom_i2c2_bit_clr() {
local val=`i2c2_get $1 $2`
local val=`axiom_i2c2_get $1 $2`
local msk=`bit_msk $3`
val=$(( val & ~msk ))
i2c2_set $1 $2 $val
axiom_i2c2_set $1 $2 $val
}

axiom_i2c2_map() {
local val=`i2c2_get $1 $2`
local val=`axiom_i2c2_get $1 $2`
val=`bit_map $val $3 $4 $5`
i2c2_set $1 $2 $val
axiom_i2c2_set $1 $2 $val
}

axiom_i2c2_bit() {
[ -n "$4" ] && \
i2c2_map $1 $2 $3 $3 $4 ||
i2c2_bit_get $1 $2 $3
axiom_i2c2_map $1 $2 $3 $3 $4 ||
axiom_i2c2_bit_get $1 $2 $3
}

axiom_i2c2_mbv() {
local val=`i2c2_get $1 $2`
local val=`axiom_i2c2_get $1 $2`
local msk=`bit_msk $3 $4`
val=$(( (val & msk) >> $3 ))
printf "%d" $val
Expand Down

0 comments on commit 8e2d40d

Please sign in to comment.