Module Name: src Committed By: rkujawa Date: Sun Aug 23 19:09:02 UTC 2015
Modified Files: src/distrib/sets/lists/man: mi src/share/man/man4: Makefile Added Files: src/share/man/man4: mcp48x1dac.4 Log Message: Add man page for mcp48x1dac driver. To generate a diff of this commit: cvs rdiff -u -r1.1506 -r1.1507 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.621 -r1.622 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/mcp48x1dac.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1506 src/distrib/sets/lists/man/mi:1.1507 --- src/distrib/sets/lists/man/mi:1.1506 Sun Aug 23 18:28:40 2015 +++ src/distrib/sets/lists/man/mi Sun Aug 23 19:09:02 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1506 2015/08/23 18:28:40 mrg Exp $ +# $NetBSD: mi,v 1.1507 2015/08/23 19:09:02 rkujawa Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1392,6 +1392,7 @@ ./usr/share/man/cat4/mcd.0 man-sys-catman .cat ./usr/share/man/cat4/mcp23s17gpio.0 man-sys-catman .cat ./usr/share/man/cat4/mcp3kadc.0 man-sys-catman .cat +./usr/share/man/cat4/mcp48x1dac.0 man-sys-catman .cat ./usr/share/man/cat4/mcp980x.0 man-sys-catman .cat ./usr/share/man/cat4/md.0 man-sys-catman .cat ./usr/share/man/cat4/mfb.0 man-sys-catman .cat @@ -4417,6 +4418,7 @@ ./usr/share/man/html4/mcd.html man-sys-htmlman html ./usr/share/man/html4/mcp23s17gpio.html man-sys-htmlman html ./usr/share/man/html4/mcp3kadc.html man-sys-htmlman html +./usr/share/man/html4/mcp48x1dac.html man-sys-htmlman html ./usr/share/man/html4/mcp980x.html man-sys-htmlman html ./usr/share/man/html4/md.html man-sys-htmlman html ./usr/share/man/html4/mfb.html man-sys-htmlman html @@ -7292,6 +7294,7 @@ ./usr/share/man/man4/mcd.4 man-sys-man .man ./usr/share/man/man4/mcp23s17gpio.4 man-sys-man .man ./usr/share/man/man4/mcp3kadc.4 man-sys-man .man +./usr/share/man/man4/mcp48x1dac.4 man-sys-man .man ./usr/share/man/man4/mcp980x.4 man-sys-man .man ./usr/share/man/man4/md.4 man-sys-man .man ./usr/share/man/man4/mfb.4 man-sys-man .man Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.621 src/share/man/man4/Makefile:1.622 --- src/share/man/man4/Makefile:1.621 Tue Aug 18 15:54:20 2015 +++ src/share/man/man4/Makefile Sun Aug 23 19:09:02 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.621 2015/08/18 15:54:20 phx Exp $ +# $NetBSD: Makefile,v 1.622 2015/08/23 19:09:02 rkujawa Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ @@ -127,7 +127,7 @@ MAN+= dbcool.4 g760a.4 lmenv.4 lmtemp.4 smscmon.4 spdmem.4 tps65217pmic.4 # machine-independent SPI devices -MAN += m25p.4 mcp23s17gpio.4 mcp3kadc.4 tm121temp.4 +MAN += m25p.4 mcp23s17gpio.4 mcp3kadc.4 mcp48x1dac.4 tm121temp.4 # machine-independent SD/MMC devices MAN += sbt.4 sdhc.4 sdmmc.4 Added files: Index: src/share/man/man4/mcp48x1dac.4 diff -u /dev/null src/share/man/man4/mcp48x1dac.4:1.1 --- /dev/null Sun Aug 23 19:09:02 2015 +++ src/share/man/man4/mcp48x1dac.4 Sun Aug 23 19:09:02 2015 @@ -0,0 +1,103 @@ +.\" $NetBSD: mcp48x1dac.4,v 1.1 2015/08/23 19:09:02 rkujawa Exp $ +.\" +.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Radoslaw Kujawa. +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Frank Wille. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd August 23, 2015 +.Dt MCP48X1DAC 4 +.Os +.Sh NAME +.Nm mcp48x1dac +.Nd Microchip 48x1 digital to analog converter +.Sh SYNOPSIS +.Cd "mcp48x1dac* at spi? slave ? flags N" +.Sh DESCRIPTION +The +.Nm +driver supports the MCP48x1 family of digital to analog converters. The digital +values to be converted to analog signal are passed through the +.Xr sysctl 8 +node. + +The driver reports the current voltage outputted on the chip's DAC channel +through the +.Xr envsys 4 +API. +It calculates these values assuming that internal 2.048V reference voltage +.Li ( Vref ) +is used. +.Pp +The following table shows the supported chips. +The type of the chip can be selected with the +.Ar flags +argument in the config file. +.Bl -column "Designation" "Resolution" "flags" -offset indent +.It Sy "Designation" Ta Sy "Resolution" Ta Sy "flags" +.It Li "MCP4801" Ta "8 bits" Ta "0" +.It Li "MCP4811" Ta "10 bits" Ta "1" +.It Li "MCP4821" Ta "12 bits" Ta "2" +.El +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 3 +variables are provided: +.Bl -tag -width indent +.It machdep.mcp48x1dac0.data +Defines digital data to be converted into analog signal. +This value is interpreted literally and send to the DAC without any conversion. +Refer to the chip datasheet for more information. +.It machdep.mcp48x1dac0.gain +When set to 1 it enables 2x output gain on the DAC channel. +The default value is 0. +.El +.Sh SEE ALSO +.Xr envsys 4 , +.Xr spi 4 , +.Xr sysctl 8 +.Pp +MCP4801/4811/4821 8/10/12-Bit Voltage Output Digital-to-Analog Converter +with Internal VREF and SPI Interface Data Sheet +.Sh HISTORY +The +.Nm +driver first appeared in +.Nx 7.0 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Radoslaw Kujawa . +.Pp +This man page is based on +.Xr mcp3kadc 4 +page by +.An Frank Wille . +.Sh BUGS +There are bugs. +