mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user