Replace uint8 with Go-idiomatic int, where it makes sense.

This commit is contained in:
Sebastian Zagrodzki
2017-04-26 22:22:07 +02:00
parent a55abe9076
commit 83276566fc
4 changed files with 25 additions and 24 deletions

View File

@@ -29,7 +29,7 @@ type EndpointInfo struct {
// with endpoint direction IN.
// The device can have up to two endpoints with the same number but with
// different directions.
Number uint8
Number int
// Direction defines whether the data is flowing IN or OUT from the host perspective.
Direction EndpointDirection
// MaxPacketSize is the maximum USB packet size for a single frame/microframe.
@@ -46,7 +46,7 @@ type EndpointInfo struct {
UsageType UsageType
}
func endpointAddr(n uint8, d EndpointDirection) uint8 {
func endpointAddr(n int, d EndpointDirection) int {
addr := n
if d == EndpointDirectionIn {
addr |= 0x80