mirror of
https://github.com/RoganDawes/P4wnP1_aloa.git
synced 2025-03-29 19:11:45 +01:00
dwc2: added bin blob and changed event interpretation according to new module
This commit is contained in:
parent
eeb127c290
commit
98691fa657
BIN
blob/4.14.34+_dwc2.ko
Normal file
BIN
blob/4.14.34+_dwc2.ko
Normal file
Binary file not shown.
1
blob/readme.md
Normal file
1
blob/readme.md
Normal file
@ -0,0 +1 @@
|
||||
Binary blobs for modified kernel modules
|
@ -23,8 +23,8 @@ To cope with that behavior, we only fire an event if the new state differs from
|
||||
|
||||
const (
|
||||
mcast_group = 24
|
||||
host_connected = uint32(0x00001000)
|
||||
host_disconnected = uint32(0x00000000)
|
||||
host_connected = byte(0x01)
|
||||
host_disconnected = byte(0x00)
|
||||
)
|
||||
|
||||
type Dwc2ConnectWatcher struct {
|
||||
@ -64,19 +64,15 @@ func (d * Dwc2ConnectWatcher) update(newStateConnected bool) {
|
||||
func (d * Dwc2ConnectWatcher) evt_loop() {
|
||||
for d.isRunning {
|
||||
indata := d.nl.Read()
|
||||
if len(indata) != 4 {
|
||||
if len(indata) != 1 {
|
||||
continue // ignore, we want tor receive an uint32
|
||||
}
|
||||
val := dwc2.Hbo().Uint32(indata)
|
||||
val := indata[0]
|
||||
switch val {
|
||||
case host_connected:
|
||||
if d.udateNeeded(true) {
|
||||
d.update(true)
|
||||
}
|
||||
case host_disconnected:
|
||||
if d.udateNeeded(false) {
|
||||
d.update(false)
|
||||
}
|
||||
default:
|
||||
fmt.Println("Unknown value from DWC2: ", val)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user