C# 클래스 CyrusBuilt.MonoPi.Components.Buzzer.BuzzerComponent

A buzzer device abstraction component.
상속: ComponentBase, IBuzzer
파일 보기 프로젝트 열기: cyrusbuilt/MonoPi

공개 메소드들

메소드 설명
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