示例#1
0
/*
 ***************************************************************************
 * Get number of voltage input sensors.
 *
 * IN:
 * @a  Activity structure.
 *
 * RETURNS:
 * Number of voltage input sensors. Number cannot exceed MAX_NR_IN_SENSORS.
 ***************************************************************************
 */
__nr_t wrap_get_in_nr(struct activity *a)
{
	__nr_t n;

	if ((n = get_in_nr()) > MAX_NR_IN_SENSORS)
		return MAX_NR_IN_SENSORS;
	else
		return n;
}
示例#2
0
/*
 ***************************************************************************
 * Get number of voltage input structures to allocate.
 *
 * IN:
 * @a  Activity structure.
 *
 * RETURNS:
 * Number of structures.
 ***************************************************************************
 */
__nr_t wrap_get_in_nr(struct activity *a)
{
	return (get_in_nr());
}