C# Класс CyrusBuilt.MonoPi.Components.Buzzer.BuzzerComponent

A buzzer device abstraction component.
Наследование: ComponentBase, IBuzzer
Показать файл Открыть проект

Открытые методы

Метод Описание
Buzz ( UInt32 freq ) : void

Start the buzzer at the specified frequency.

Buzz ( UInt32 freq, Int32 duration ) : void

Start the buzzer at the specified frequency for the specified duration.

BuzzerComponent ( IGpio pwmPin ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Buzzer.BuzzerComponent class with the pin the buzzer is attached to.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Buzzer.BuzzerComponent. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Buzzer.BuzzerComponent in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Buzzer.BuzzerComponent so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Buzzer.BuzzerComponent was occupying.

Stop ( ) : void

Stops the buzzer.

Описание методов

Buzz() публичный Метод

Start the buzzer at the specified frequency.
public Buzz ( UInt32 freq ) : void
freq System.UInt32 /// The frequency to buzz at. ///
Результат void

Buzz() публичный Метод

Start the buzzer at the specified frequency for the specified duration.
public Buzz ( UInt32 freq, Int32 duration ) : void
freq System.UInt32 /// The frequency to buzz at. ///
duration System.Int32 /// The duration in milliseconds. ///
Результат void

BuzzerComponent() публичный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Buzzer.BuzzerComponent class with the pin the buzzer is attached to.
/// The pin cannot be null. ///
public BuzzerComponent ( IGpio pwmPin ) : System
pwmPin IGpio /// The pin the buzzer is attached to. ///
Результат System

Dispose() публичный Метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Buzzer.BuzzerComponent. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Buzzer.BuzzerComponent in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Buzzer.BuzzerComponent so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Buzzer.BuzzerComponent was occupying.
public Dispose ( ) : void
Результат void

Stop() публичный Метод

Stops the buzzer.
public Stop ( ) : void
Результат void