Changes between Version 93 and Version 94 of gsc


Ignore:
Timestamp:
11/16/2021 12:01:36 AM (3 years ago)
Author:
Tim Harvey
Comment:

removed non-gsc-driver instructions for power-down; everyone should have and be using the gsc driver by now

Legend:

Unmodified
Added
Removed
Modified
  • gsc

    v93 v94  
    881881#!bash
    882882echo 300 > /sys/bus/i2c/devices/0-0020/powerdown # sleep for 5 mins
    883 }}}
    884 * Manually writing to GSC (if you don't have the GSC driver)
    885 The following example will sleep the board for 10 seconds by setting the “add timer” to 10 seconds (from the current time) and then putting the board to sleep. This example uses the Linux I2C utilities.
    886 {{{
    887 #!bash
    888 SECS=300 ;# 5 mins
    889 i2cset -f -y 0 0x20 6 $((SECS % 256)); SECS=$((SECS >> 8))
    890 i2cset -f -y 0 0x20 7 $((SECS % 256)); SECS=$((SECS >> 8))
    891 i2cset -f -y 0 0x20 8 $((SECS % 256)); SECS=$((SECS >> 8))
    892 i2cset -f -y 0 0x20 9 $((SECS % 256))
    893 # set add time bit - taking care to not disturb other bits
    894 R1=$(i2cget -f -y 0 0x20 1) && \
    895   R1=$((R1 | 0x04)) && \
    896   i2cset -f -y 0 0x20 1 $R1 || echo i2c error
    897 # set sleep enable and sleep activate bits - taking care not to disturb other bits
    898 R1=$(i2cget -f -y 0 0x20 1) && \
    899   R1=$((R1 | 0x03)) && \
    900   i2cset -f -y 0 0x20 1 $R1 || echo i2c error
    901883}}}
    902884