configs/: All functions that used to return an xcpt_t old handler value, not return NULL. The oldhandler value is no longer useful with the recent changes to the interrupt argument passing.
This commit is contained in:
parent
91920f6fc3
commit
75446b349b
@ -1,7 +1,7 @@
|
||||
/************************************************************************************
|
||||
* configs/ea3131/src/lpc31_usbhost.c
|
||||
*
|
||||
* Copyright (C) 2013, 2015-2016 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2013, 2015-2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -82,12 +82,6 @@
|
||||
|
||||
static struct usbhost_connection_s *g_ehciconn;
|
||||
|
||||
/* Overcurrent interrupt handler */
|
||||
|
||||
#if 0 /* Not yet implemented */
|
||||
static xcpt_t g_ochandler;
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
@ -292,16 +286,16 @@ void lpc31_usbhost_vbusdrive(int rhport, bool enable)
|
||||
*
|
||||
* Input parameter:
|
||||
* handler - New overcurrent interrupt handler
|
||||
* arg - The argument that will accompany the interrupt
|
||||
*
|
||||
* Returned value:
|
||||
* Old overcurrent interrupt handler
|
||||
* Zero (OK) returned on success; a negated errno value is returned on failure.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#if 0 /* Not ready yet */
|
||||
xcpt_t lpc31_setup_overcurrent(xcpt_t handler)
|
||||
int lpc31_setup_overcurrent(xcpt_t handler, void *arg)
|
||||
{
|
||||
xcpt_t oldhandler;
|
||||
irqstate_t flags;
|
||||
|
||||
/* Disable interrupts until we are done. This guarantees that the
|
||||
@ -310,18 +304,11 @@ xcpt_t lpc31_setup_overcurrent(xcpt_t handler)
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
/* Get the old button interrupt handler and save the new one */
|
||||
|
||||
oldhandler = g_ochandler;
|
||||
g_ochandler = handler;
|
||||
|
||||
/* Configure the interrupt */
|
||||
#warning Missing logic
|
||||
|
||||
/* Return the old button handler (so that it can be restored) */
|
||||
|
||||
leave_critical_section(flags);
|
||||
return oldhandler;
|
||||
return OK;
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************************************
|
||||
* configs/olimex-lpc-h3131/include/board.h
|
||||
*
|
||||
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -187,14 +187,15 @@ void lpc31_boardinitialize(void);
|
||||
*
|
||||
* Input parameter:
|
||||
* handler - New overcurrent interrupt handler
|
||||
* arg - The argument that will accompany the interrupt
|
||||
*
|
||||
* Returned value:
|
||||
* Old overcurrent interrupt handler
|
||||
* Zero (OK) returned on success; a negated errno value is returned on failure.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#if 0 /* Not ready yet */
|
||||
xcpt_t lpc31_setup_overcurrent(xcpt_t handler);
|
||||
int lpc31_setup_overcurrent(xcpt_t handler, void *arg);
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************************************
|
||||
* configs/olimex-lpc-h3131/src/lpc31_usbhost.c
|
||||
*
|
||||
* Copyright (C) 2013, 2015-2016 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2013, 2015-2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -293,16 +293,16 @@ void lpc31_usbhost_vbusdrive(int rhport, bool enable)
|
||||
*
|
||||
* Input parameter:
|
||||
* handler - New overcurrent interrupt handler
|
||||
* arg - The argument that will accompany the interrupt
|
||||
*
|
||||
* Returned value:
|
||||
* Old overcurrent interrupt handler
|
||||
* Zero (OK) returned on success; a negated errno value is returned on failure.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#if 0 /* Not ready yet */
|
||||
xcpt_t lpc31_setup_overcurrent(xcpt_t handler)
|
||||
int lpc31_setup_overcurrent(xcpt_t handler, void *arg)
|
||||
{
|
||||
xcpt_t oldhandler;
|
||||
irqstate_t flags;
|
||||
|
||||
/* Disable interrupts until we are done. This guarantees that the
|
||||
@ -311,16 +311,9 @@ xcpt_t lpc31_setup_overcurrent(xcpt_t handler)
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
/* Get the old button interrupt handler and save the new one */
|
||||
|
||||
oldhandler = g_ochandler;
|
||||
g_ochandler = handler;
|
||||
|
||||
/* Configure the interrupt */
|
||||
#warning Missing logic
|
||||
|
||||
/* Return the old button handler (so that it can be restored) */
|
||||
|
||||
leave_critical_section(flags);
|
||||
return oldhandler;
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ Temperature Sensor
|
||||
|
||||
More complex temperature sensor operations are also available. See the
|
||||
IOCTL commands enumerated in include/nuttx/sensors/lm75.h. Also read the
|
||||
escriptions of the stm32_lm75initialize() and stm32_lm75attach()
|
||||
descriptions of the stm32_lm75initialize() and stm32_lm75attach()
|
||||
interfaces in the arch/board/board.h file (sames as
|
||||
configs/stm3210e-eval/include/board.h).
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************************************
|
||||
* configs/stm3210e-eval/include/board.h
|
||||
*
|
||||
* Copyright (C) 2009, 2016 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2009, 2016-2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -289,14 +289,15 @@ int stm32_lm75initialize(FAR const char *devpath);
|
||||
*
|
||||
* Input parameters:
|
||||
* irqhandler - the LM-75 interrupt handler
|
||||
* arg - The argument that will accompany the interrupt
|
||||
*
|
||||
* Returned Value:
|
||||
* The previous LM-75 interrupt handler
|
||||
* Zero (OK) returned on success; a negated errno value is returned on failure.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && defined(CONFIG_STM32_I2C1)
|
||||
xcpt_t stm32_lm75attach(xcpt_t irqhandler);
|
||||
int stm32_lm75attach(xcpt_t irqhandler, void *arg);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
|
@ -106,15 +106,17 @@ int stm32_lm75initialize(FAR const char *devpath)
|
||||
*
|
||||
* Input parameters:
|
||||
* irqhandler - the LM-75 interrupt handler
|
||||
* arg - The argument that will accompany the interrupt
|
||||
*
|
||||
* Returned Value:
|
||||
* The previous LM-75 interrupt handler
|
||||
* Zero (OK) returned on success; a negated errno value is returned on failure.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
xcpt_t stm32_lm75attach(xcpt_t irqhandler)
|
||||
int stm32_lm75attach(xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
return stm32_gpiosetevent(GPIO_LM75_OSINT, true, true, true, irqhandler, NULL);
|
||||
(void)stm32_gpiosetevent(GPIO_LM75_OSINT, true, true, true, irqhandler, arg);
|
||||
return OK;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_I2C && CONFIG_I2C_LM75 && CONFIG_STM32_I2C1 */
|
||||
|
Loading…
Reference in New Issue
Block a user