参数资料
型号: 151-0153
厂商: Rabbit Semiconductor
文件页数: 80/162页
文件大小: 0K
描述: ASSEMBLY - RABBITFLEX CABLES
标准包装: 1
系列: RabbitFLEX™
附件类型: 缆线组件
适用于相关产品: BL300F
// Activate the tone system
flexToneActivate();
This function simply activiates the tone driver. Once enabled, it consumes about 10-20% of the system’s
processor time while running. Therefore, in a real program, you might want to activate and shutdown
(using flexToneShutdown() ) the tone driver when needed.
The next section of code simply builds the waveforms for the five different tones and then displays a menu
of choices to the user. We will skip down to the next RabbitFLEX-related section of code.
// Continue until the user requests to exit the program
while (!request_exit) {
ch = getchar();
// Perform the user command
switch (ch) {
case '0':
// Play the raspy tone
flexToneLoad(tones[0], tone_len[0], repeat);
break;
This section of code begins with a while loop that checks for user input. Note in particular the
flexToneLoad() call—this loads the given tone and begins playing it. The “repeat” parameter is used
to indicate how many times the tone will be repeated ( ≥ 128 means to repeat indefinitely). Following the
above section are a number of other “case” statements that load other tones and implement other com-
mands. We will skip them.
// Turns off the tone system. This frees up the processor for other
// tasks, but in this case, we're just exiting the program.
flexToneShutdown();
Finally, after the user has chosen to exit the program, the flexToneShutdown() function is
called. This disables the tone driver and frees the processor for handling other tasks.
6.4.2 Extending speaker_tone.c
speaker_tone.c shows how to use the tone driver, but can we combine it with some of the other Rab-
bitFLEX I/O functionality? In this section, we will add the ability to select the tone to play via a digital
input switch, and light up a corresponding digital output LED when we select a tone.
To implement this sample, we need appropriate digital inputs and outputs. We will use the demo board
from the RabbitFLEX toolkit. We will use each of the four switches and LEDs. We will connect the
switches directly to 1.4V TTL Threshold digital inputs, and the LEDs directly to 100mA sinking driver,
40V max digital outputs.
74
Applications Programming
相关PDF资料
PDF描述
1515738-1 INSERT ASSEMBLY 1 CHANNEL
1515739-1 INSERT ASSEMBLY, 2 X 1310
1515740-1 INSERT ASSEMBLY 4 CHANNEL
1515747-1 INSERT ASSEMBLY 4 CHANNEL
1515867-1 PROTECTIVE CAP,PLUG CONN.
相关代理商/技术参数
参数描述
151-01530 功能描述:RATCHET P CLAMP SIZE A SOFT INSE 制造商:hellermanntyton 系列:- 零件状态:新产品 配件类型:插件 配套使用产品/相关产品:Ratchet P 夹,6.2mm-13.7mm 捆扎直径 材料:热塑性塑胶(TPE) 特性:- 标准包装:100
151-01531 功能描述:RATCHET P CLAMP SIZE B SOFT INSE 制造商:hellermanntyton 系列:- 零件状态:新产品 配件类型:插件 配套使用产品/相关产品:Ratchet P 夹,13.2mm-19.5mm 捆扎直径 材料:热塑性塑胶(TPE) 特性:- 标准包装:100
151-01532 功能描述:RATCHET P CLAMP SIZE C SOFT INSE 制造商:hellermanntyton 系列:- 零件状态:新产品 配件类型:插件 配套使用产品/相关产品:Ratchet P 夹,19.2mm-36mm 捆扎直径 材料:热塑性塑胶(TPE) 特性:- 标准包装:100
151-01533 功能描述:RATCHET P CLAMP SIZE D SOFT INSE 制造商:hellermanntyton 系列:- 零件状态:新产品 配件类型:插件 配套使用产品/相关产品:Ratchet P 夹,35.1mm-51mm 捆扎直径 材料:热塑性塑胶(TPE) 特性:- 标准包装:100
151-01554 功能描述:WIDE STRAP ADHESIVE MOUNT BLK 制造商:hellermanntyton 系列:* 零件状态:在售 标准包装:3,000