start renaming the constants to Go-style.

This commit is contained in:
Sebastian Zagrodzki
2017-03-27 22:23:47 +02:00
parent 341fde410e
commit b70848cf73
7 changed files with 70 additions and 70 deletions

View File

@@ -31,7 +31,7 @@ type Endpoint struct {
}
func (e *Endpoint) Read(buf []byte) (int, error) {
if EndpointDirection(e.Address)&ENDPOINT_DIR_MASK != ENDPOINT_DIR_IN {
if EndpointDirection(e.Address)&EndpointDirectionMask != EndpointDirectionIn {
return 0, fmt.Errorf("usb: read: not an IN endpoint")
}
@@ -39,7 +39,7 @@ func (e *Endpoint) Read(buf []byte) (int, error) {
}
func (e *Endpoint) Write(buf []byte) (int, error) {
if EndpointDirection(e.Address)&ENDPOINT_DIR_MASK != ENDPOINT_DIR_OUT {
if EndpointDirection(e.Address)&EndpointDirectionMask != EndpointDirectionOut {
return 0, fmt.Errorf("usb: write: not an OUT endpoint")
}