using System;
using NativeAdc = Interop.Peripheral.Adc;
-namespace Tizen.Peripheral
+namespace Tizen.Peripheral.Adc
{
/// <summary>
/// The class allows applications to use the platform ADC peripheral.
/// </summary>
/// <privilege>http://tizen.org/privilege/peripheralio</privilege>
- public class Adc : IDisposable
+ public class AdcChannel : IDisposable
{
/// <summary>
/// Native handle to ADC.
/// </summary>
/// <param name="device">The ADC device number.</param>
/// <param name="channel">The ADC channel number to control.</param>
- public Adc(int device, int channel)
+ public AdcChannel(int device, int channel)
{
var ret = NativeAdc.Open(device, channel, out IntPtr handle);
if (ret != Internals.Errors.ErrorCode.None)
/// <summary>
/// Closes the ADC pin.
/// </summary>
- ~Adc()
+ ~AdcChannel()
{
Dispose(false);
}
/// The class allows applications to use the platform Digital Pins as Input/Output.
/// </summary>
/// <privilege>http://tizen.org/privilege/peripheralio</privilege>
- public class Gpio : IDisposable
+ public class GpioPin : IDisposable
{
private GpioChangePolarity _polarityType;
/// </summary>
/// <param name="pinNumber">The GPIO pin number.</param>
/// <param name="mode">GPIO direction.</param>
- public Gpio(int pinNumber, GpioPinDriveMode mode)
+ public GpioPin(int pinNumber, GpioPinDriveMode mode)
{
var ret = NativeGpio.Open(pinNumber, out IntPtr handle);
if (ret != ErrorCode.None)
/// <summary>
/// Closes the GPIO pin.
/// </summary>
- ~Gpio()
+ ~GpioPin()
{
Dispose(false);
}
using System;
using NativeI2c = Interop.Peripheral.I2c;
-namespace Tizen.Peripheral
+namespace Tizen.Peripheral.I2c
{
/// <summary>
/// The class allows applications to communicate via i2c platform's bus.
/// </summary>
/// <privilege>http://tizen.org/privilege/peripheralio</privilege>
- public class I2c : IDisposable
+ public class I2cDevice : IDisposable
{
/// <summary>
/// Native handle to I2c.
/// </summary>
/// <param name="bus">The I2C bus number that the slave device is connected.</param>
/// <param name="address">The address of the slave device.</param>
- public I2c(int bus, int address)
+ public I2cDevice(int bus, int address)
{
var ret = NativeI2c.Open(bus, address, out IntPtr handle);
if (ret != Internals.Errors.ErrorCode.None)
/// <summary>
/// Closes the connection to the I2C slave device.
/// </summary>
- ~I2c()
+ ~I2cDevice()
{
Dispose(false);
}
/// The class allows applications to use the platform PWM peripheral.
/// </summary>
/// <privilege>http://tizen.org/privilege/peripheralio</privilege>
- public class Pwm : IDisposable
+ public class PwmPin : IDisposable
{
//TODO provide default values.
/// </summary>
/// <param name="chip">The PWM chip number.</param>
/// <param name="pin">The PWM pin (channel) number to control.</param>
- public Pwm(int chip, int pin)
+ public PwmPin(int chip, int pin)
{
var ret = NativePwm.Open(chip, pin, out IntPtr handle);
if (ret != Internals.Errors.ErrorCode.None)
/// <summary>
/// Closes the PWM pin.
/// </summary>
- ~Pwm()
+ ~PwmPin()
{
Dispose(false);
}
/// The class allows applications to communicate via SPI platform's bus.
/// </summary>
/// <privilege>http://tizen.org/privilege/peripheralio</privilege>
- public class Spi : IDisposable
+ public class SpiDevice : IDisposable
{
//TODO Provide default values.
/// </summary>
/// <param name="bus">The SPI bus number.</param>
/// <param name="chip">The SPI chip select number.</param>
- public Spi(int bus, int chip)
+ public SpiDevice(int bus, int chip)
{
var ret = NativeSpi.Open(bus, chip, out IntPtr handle);
if (ret != Internals.Errors.ErrorCode.None)
/// <summary>
/// Closes the SPI slave device.
/// </summary>
- ~Spi()
+ ~SpiDevice()
{
Dispose(false);
}
/// The class allows applications to communicate via UART platform's bus.
/// </summary>
/// <privilege>http://tizen.org/privilege/peripheralio</privilege>
- public class Uart : IDisposable
+ public class SerialPort : IDisposable
{
private BaudRate _baudRate;
private DataBits _dataBits;
/// Opens the UART slave device.
/// </summary>
/// <param name="port">The UART port number that the slave device is connected.</param>
- public Uart(int port)
+ public SerialPort(int port)
{
var ret = NativeUart.Open(port, out IntPtr handle);
if (ret != Internals.Errors.ErrorCode.None)
/// <summary>
/// Closes the UART slave device.
/// </summary>
- ~Uart()
+ ~SerialPort()
{
Dispose(false);
}