Trivial changes from review of last PR.

This commit is contained in:
Gregory Nutt 2017-03-25 10:38:41 -06:00
parent c174074dd8
commit 7d57a2b2bd
5 changed files with 13 additions and 7 deletions

View File

@ -87,6 +87,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* COMP2 default configuration **********************************************/
#ifdef CONFIG_STM32_COMP2

View File

@ -86,6 +86,8 @@ int stm32_comp_setup(void)
if (!initialized)
{
/* Get the comparator interface */
#ifdef CONFIG_STM32_COMP2
comp = stm32_compinitialize(2);
if (comp == NULL)
@ -113,6 +115,8 @@ int stm32_comp_setup(void)
}
#endif
/* Register the comparator character driver at /dev/comp0 */
ret = comp_register("/dev/comp0", comp);
if (ret < 0)
{

View File

@ -110,12 +110,11 @@ endif # if ADC_PGA11X
endif # ADC
config COMP
bool "Analog Comparator"
default n
---help---
bool "Analog Comparator"
default n
---help---
Select to enable support for Analog Comparators (COMPs).
config DAC
bool "Digital-to-Analog Conversion"
default n

View File

@ -1,7 +1,7 @@
############################################################################
# drivers/analog/Make.defs
#
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
# Copyright (C) 2011-2012, 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@ -104,4 +104,3 @@ ifeq ($(CONFIG_COMP),y)
endif
endif
endif

View File

@ -77,7 +77,10 @@ static const struct file_operations comp_fops =
NULL, /* seek */
comp_ioctl /* ioctl */
#ifndef CONFIG_DISABLE_POLL
, 0
, NULL /* poll */
#endif
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
#endif
};