diff --git a/configs/cloudctrl/src/stm32_usb.c b/configs/cloudctrl/src/stm32_usb.c index a1e889feb1..955377a5dd 100644 --- a/configs/cloudctrl/src/stm32_usb.c +++ b/configs/cloudctrl/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/cloudctrl/src/stm32_usb.c * - * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * Darcy Gong * @@ -274,16 +274,18 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) * * Input Parameter: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * * Returned value: - * Old overcurrent interrupt handler + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return NULL; + return -ENOSYS; } #endif diff --git a/configs/mikroe-stm32f4/src/stm32_usb.c b/configs/mikroe-stm32f4/src/stm32_usb.c index 44321bd7d3..8047a631fd 100644 --- a/configs/mikroe-stm32f4/src/stm32_usb.c +++ b/configs/mikroe-stm32f4/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/mikroe_stm32f4/src/stm32_usb.c * - * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -273,16 +273,18 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) * * Input Parameter: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * * Returned value: - * Old overcurrent interrupt handler + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, NULL); + return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, arg); } #endif diff --git a/configs/nucleo-144/src/stm32_usb.c b/configs/nucleo-144/src/stm32_usb.c index a1a2059176..597570ae18 100644 --- a/configs/nucleo-144/src/stm32_usb.c +++ b/configs/nucleo-144/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs//nucleo-144/src/stm32_usb.c * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2016-2017 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * David Sidrane * @@ -295,16 +295,18 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) * * Input Parameter: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * * Returned value: - * Old overcurrent interrupt handler + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, NULL); + return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, arg); } #endif diff --git a/configs/olimex-stm32-e407/src/stm32_usb.c b/configs/olimex-stm32-e407/src/stm32_usb.c index 55df883ba8..f59dc54486 100644 --- a/configs/olimex-stm32-e407/src/stm32_usb.c +++ b/configs/olimex-stm32-e407/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/stm32f4discovery/src/stm32_usb.c * - * Copyright (C) 2012-2013, 2015-2916 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015-2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -302,16 +302,18 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) * * Input Parameter: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * * Returned value: - * Old overcurrent interrupt handler + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, NULL); + return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, arg); } #endif diff --git a/configs/olimex-stm32-h407/src/stm32_usb.c b/configs/olimex-stm32-h407/src/stm32_usb.c index 10cb1c16d4..a5148f1e57 100644 --- a/configs/olimex-stm32-h407/src/stm32_usb.c +++ b/configs/olimex-stm32-h407/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/olimex-stm32-h407/src/stm32_usbdev.c * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2016-2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -280,16 +280,18 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) * * Input Parameters: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * - * Returned Value: - * Old overcurrent interrupt handler + * Returned value: + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return stm32_gpiosetevent(GPIO_OTGHS_OVER, true, true, true, handler, NULL); + return stm32_gpiosetevent(GPIO_OTGHS_OVER, true, true, true, handler, arg); } #endif diff --git a/configs/olimex-stm32-p207/src/stm32_usb.c b/configs/olimex-stm32-p207/src/stm32_usb.c index 9996da8b7f..fdef1532dc 100644 --- a/configs/olimex-stm32-p207/src/stm32_usb.c +++ b/configs/olimex-stm32-p207/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/olimex-stm32-p207/src/stm32_usb.c * - * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -238,16 +238,18 @@ int stm32_usbhost_initialize(void) * * Input Parameter: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * * Returned value: - * Old overcurrent interrupt handler + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, NULL); + return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, arg); } #endif diff --git a/configs/olimex-stm32-p407/src/stm32_usb.c b/configs/olimex-stm32-p407/src/stm32_usb.c index 4c3799e3af..aee3ecf591 100644 --- a/configs/olimex-stm32-p407/src/stm32_usb.c +++ b/configs/olimex-stm32-p407/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/olimex-stm32-p407/src/stm32_usb.c * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2016-2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -238,16 +238,18 @@ int stm32_usbhost_setup(void) * * Input Parameter: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * * Returned value: - * Old overcurrent interrupt handler + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, NULL); + return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, arg); } #endif diff --git a/configs/shenzhou/src/stm32_usb.c b/configs/shenzhou/src/stm32_usb.c index b63a64c053..5baddf4d01 100644 --- a/configs/shenzhou/src/stm32_usb.c +++ b/configs/shenzhou/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/shenzhou/src/stm32_usb.c * - * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -273,16 +273,18 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) * * Input Parameter: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * * Returned value: - * Old overcurrent interrupt handler + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return NULL; + return -ENOSYS; } #endif diff --git a/configs/stm3220g-eval/src/stm32_usb.c b/configs/stm3220g-eval/src/stm32_usb.c index 371daed38a..33809073c8 100644 --- a/configs/stm3220g-eval/src/stm32_usb.c +++ b/configs/stm3220g-eval/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/stm3220g-eval/src/stm32_usb.c * - * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -273,16 +273,18 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) * * Input Parameter: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * * Returned value: - * Old overcurrent interrupt handler + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, NULL); + return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, arg); } #endif diff --git a/configs/stm3240g-eval/src/stm32_usb.c b/configs/stm3240g-eval/src/stm32_usb.c index 7c5494a501..27846d9cf6 100644 --- a/configs/stm3240g-eval/src/stm32_usb.c +++ b/configs/stm3240g-eval/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/stm3240g-eval/src/stm32_usbdev.c * - * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -273,16 +273,18 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) * * Input Parameter: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * * Returned value: - * Old overcurrent interrupt handler + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, NULL); + return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, arg); } #endif diff --git a/configs/stm32f429i-disco/src/stm32_usb.c b/configs/stm32f429i-disco/src/stm32_usb.c index 3daa643edc..33718f1534 100644 --- a/configs/stm32f429i-disco/src/stm32_usb.c +++ b/configs/stm32f429i-disco/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/stm32f429i-disco/src/stm32_usbdev.c * - * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -279,16 +279,18 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) * * Input Parameters: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * - * Returned Value: - * Old overcurrent interrupt handler + * Returned value: + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return stm32_gpiosetevent(GPIO_OTGHS_OVER, true, true, true, handler, NULL); + return stm32_gpiosetevent(GPIO_OTGHS_OVER, true, true, true, handler, arg); } #endif diff --git a/configs/stm32f4discovery/src/stm32_usb.c b/configs/stm32f4discovery/src/stm32_usb.c index f657140654..c929c1bfe2 100644 --- a/configs/stm32f4discovery/src/stm32_usb.c +++ b/configs/stm32f4discovery/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/stm32f4discovery/src/stm32_usb.c * - * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -302,16 +302,18 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) * * Input Parameter: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * * Returned value: - * Old overcurrent interrupt handler + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, NULL); + return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, arg); } #endif diff --git a/configs/stm32f746-ws/src/stm32_usb.c b/configs/stm32f746-ws/src/stm32_usb.c index 84f782c5ef..a2985140b3 100644 --- a/configs/stm32f746-ws/src/stm32_usb.c +++ b/configs/stm32f746-ws/src/stm32_usb.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/stm32f4discovery/src/stm32_usb.c * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2016-2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -305,16 +305,18 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) * * Input Parameter: * handler - New overcurrent interrupt handler + * arg - The argument provided for the interrupt handler * * Returned value: - * Old overcurrent interrupt handler + * Zero (OK) is returned on success. Otherwise, a negated errno value is returned + * to indicate the nature of the failure. * ************************************************************************************/ #ifdef CONFIG_USBHOST -xcpt_t stm32_setup_overcurrent(xcpt_t handler) +int stm32_setup_overcurrent(xcpt_t handler, void *arg) { - return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, NULL); + return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, arg); } #endif