summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Radermacher <blip@mockmoon-cybernetics.ch>2020-04-11 13:13:37 +0200
committerDominic Radermacher <blip@mockmoon-cybernetics.ch>2020-04-11 13:13:37 +0200
commit36f32595d7fe5afed7f3c78bc5445f157cacd1f8 (patch)
treeebd248040b18dfe1c0ef71ddb2a2874c115dad9a
parent692be983eb257254437b36579f7e99437e2a4940 (diff)
update author info, some cosmetic source changes ;-)
-rw-r--r--include/lan951x-led-ctl.h18
-rw-r--r--src/lan951x-led-ctl.c22
2 files changed, 20 insertions, 20 deletions
diff --git a/include/lan951x-led-ctl.h b/include/lan951x-led-ctl.h
index 1ec50cc..18249a8 100644
--- a/include/lan951x-led-ctl.h
+++ b/include/lan951x-led-ctl.h
@@ -1,17 +1,17 @@
/*
lan951x-led-ctl - control LEDs of LAN951X ethernet/usb controllers
-
- Copyright (C) 2015 Dominic Radermacher <dominic.radermacher@gmail.com>
-
+
+ Copyright (C) 2015-2020 Dominic Radermacher <dominic@familie-radermacher.ch>
+
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 3 as
published by the Free Software Foundation
-
+
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -56,7 +56,7 @@
void usage(void);
int ledmode(const char* str);
-int parse_args(int argc, char **argv);
-libusb_device_handle *lan951x_open(int vid, int pid);
-int lan951x_rd_reg(libusb_device_handle *h, uint16_t reg, uint32_t *val);
-int lan951x_wr_reg(libusb_device_handle *h, uint16_t reg, uint32_t val);
+int parse_args(int argc, char** argv);
+libusb_device_handle* lan951x_open(int vid, int pid);
+int lan951x_rd_reg(libusb_device_handle* h, uint16_t reg, uint32_t* val);
+int lan951x_wr_reg(libusb_device_handle* h, uint16_t reg, uint32_t val);
diff --git a/src/lan951x-led-ctl.c b/src/lan951x-led-ctl.c
index c60884c..c072805 100644
--- a/src/lan951x-led-ctl.c
+++ b/src/lan951x-led-ctl.c
@@ -1,7 +1,7 @@
/*
lan951x-led-ctl - control LEDs of LAN951X ethernet/usb controllers
- Copyright (C) 2015 Dominic Radermacher <dominic.radermacher@gmail.com>
+ Copyright (C) 2015-2020 Dominic Radermacher <dominic@familie-radermacher.ch>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 3 as
@@ -27,11 +27,11 @@
/* global variables */
int led_arr[3] = { MODE_KEEP, MODE_KEEP, MODE_KEEP };
-libusb_device_handle *lan951x_open(int vid, int pid)
+libusb_device_handle* lan951x_open(int vid, int pid)
{
- libusb_device **devs;
- libusb_device *dev;
- libusb_device_handle *handle = NULL;
+ libusb_device** devs;
+ libusb_device* dev;
+ libusb_device_handle* handle = NULL;
struct libusb_device_descriptor desc;
int r,i=0;
@@ -66,17 +66,17 @@ libusb_device_handle *lan951x_open(int vid, int pid)
return NULL;
}
-int lan951x_rd_reg(libusb_device_handle *h, uint16_t reg, uint32_t *val)
+int lan951x_rd_reg(libusb_device_handle* h, uint16_t reg, uint32_t* val)
{
return libusb_control_transfer(h, LIBUSB_REQUEST_TYPE_VENDOR|0x80,
- USB_VENDOR_REQUEST_RD_REG, 0, reg, (uint8_t *)val, 4,
+ USB_VENDOR_REQUEST_RD_REG, 0, reg, (uint8_t*)val, 4,
USB_CTRL_TIMEOUT);
}
-int lan951x_wr_reg(libusb_device_handle *h, uint16_t reg, uint32_t val)
+int lan951x_wr_reg(libusb_device_handle* h, uint16_t reg, uint32_t val)
{
return libusb_control_transfer(h, LIBUSB_REQUEST_TYPE_VENDOR,
- USB_VENDOR_REQUEST_WR_REG, 0, reg, (uint8_t *)&val, 4,
+ USB_VENDOR_REQUEST_WR_REG, 0, reg, (uint8_t*)&val, 4,
USB_CTRL_TIMEOUT);
}
@@ -122,9 +122,9 @@ int parse_args(int argc, char **argv)
return i;
}
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
{
- libusb_device_handle *handle = NULL;
+ libusb_device_handle* handle = NULL;
uint32_t val;
if (argc < 2) {