1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/usr/bin/env bash CONFIG=/etc/intelpwm.conf if [ ! -f "$CONFIG" ]; then echo "$CONFIG not found" exit 1 fi source $CONFIG RAW_DATA="$(intel_reg read ${REGISTER})" CYCLE="${RAW_DATA:56:4}" intel_reg write "${REGISTER}" "0x${PERIOD}${CYCLE}"