本文整理汇总了C++中output_low函数的典型用法代码示例。如果您正苦于以下问题:C++ output_low函数的具体用法?C++ output_low怎么用?C++ output_low使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了output_low函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(void) {
// initialize the direction of PORTD #6 to be an output
set_output(DDRC, LED1);
set_output(DDRC, LED2);
set_output(DDRC, LED3);
set_output(DDRD, LED4);
while (1) {
output_high(PORTC, LED1);
delay_ms(200);
output_high(PORTC, LED2);
delay_ms(200);
output_high(PORTC, LED3);
delay_ms(200);
output_high(PORTD, LED4);
delay_ms(200);
output_low(PORTC, LED1);
delay_ms(200);
output_low(PORTC, LED2);
delay_ms(200);
output_low(PORTC, LED3);
delay_ms(200);
output_low(PORTD, LED4);
delay_ms(200);
}
}
示例2: glcd_init
// Purpose: Initialize a graphic LCD. This must be called before any
// other glcd function is used.
// Inputs: The initialization mode
// OFF - Turns the LCD off
// ON - Turns the LCD on
// Date: 5/28/2003
void glcd_init(int1 mode)
{
// Initialze some pins
output_HIGH(GLCD_RST);
output_low(GLCD_E);
output_low(GLCD_CS1);
output_low(GLCD_CS2);
output_low(GLCD_DI); // Set for instruction
glcd_writeByte(GLCD_CS1, 0xC0); // Specify first RAM line at the top
glcd_writeByte(GLCD_CS2, 0xC0); // of the screen
glcd_writeByte(GLCD_CS1, 0x40); // Set the column address to 0
glcd_writeByte(GLCD_CS2, 0x40);
glcd_writeByte(GLCD_CS1, 0xB8); // Set the page address to 0
glcd_writeByte(GLCD_CS2, 0xB8);
if(mode == ON)
{
glcd_writeByte(GLCD_CS1, 0x3F); // Turn the display on
glcd_writeByte(GLCD_CS2, 0x3F);
}
else
{
glcd_writeByte(GLCD_CS1, 0x3E); // Turn the display off
glcd_writeByte(GLCD_CS2, 0x3E);
}
glcd_fillScreen(OFF); // Clear the display
}
示例3: read_analog
int16 read_analog(int channel)
{
int i;
channel &= 0x1F;
delay_us(2); // 2 usec delay
output_high(MPH_CLK); // activates SCLK
output_high(MPH_SYNC); // activetes SYNC
delay_us(1); // 1 usec delay
output_low(MPH_SYNC); // resets SYNC
for(i=8; i>0; i--)
{
if ((channel & (1<<(i-1)))==0)
output_low(MPH_DIN);
else
output_high(MPH_DIN);
output_low(MPH_CLK); // resets SCLK
output_high(MPH_CLK); // activates SCLK
}
delay_us(50); // 50 usec delay to stabilize the value.
return (read_adc()); // reads the analog channel, waits for end of conversion
// and returns the value.
}
示例4: motor_off
void motor_off(){
output_low(PIN_A1);
delay_ms(100);
output_low(PIN_A2);
output_low(PIN_A3);
output_low(PIN_A4);
}
示例5: giro_izquierda50
void giro_izquierda50() {
output_high(PIN_B4);
output_low(PIN_B5);
output_low(PIN_B6);
output_high(PIN_B7);
delay_ms( time );
output_low(PIN_B4);
output_low(PIN_B5);
output_low(PIN_B6);
output_high(PIN_B7);
delay_ms( time );
output_low(PIN_B4);
output_low(PIN_B5);
output_high(PIN_B6);
output_high(PIN_B7);
delay_ms( time );
output_low(PIN_B4);
output_low(PIN_B5);
output_high(PIN_B6);
output_low(PIN_B7);
delay_ms( time );
}
示例6: glcd_image
void glcd_image(long mempointer /*This is the image location in program memory*/)
{ int j, i;
int page = 0xB8;
char chipsel;
char buffer[1];
output_low(GLCD_DI); // Set for instruction
glcd_writeByte(GLCD_CS1, 0x40); // Set the column address to 0
glcd_writeByte(GLCD_CS2, 0x40);
glcd_writeByte(GLCD_CS1, page); // Set the page address to 0
glcd_writeByte(GLCD_CS2, page);
for (j = 0; j < 8; j++, page+=1)
{ output_low(GLCD_DI);
glcd_writeByte(GLCD_CS1, page);
glcd_writeByte(GLCD_CS2, page);
for (i = 0; i < 128; i++)
{
if ( i < 64)
{
chipsel = GLCD_CS1;
}
else
{
chipsel = GLCD_CS2;
}
read_program_memory(mempointer, buffer, 1);
mempointer++;
output_high(GLCD_DI);
glcd_writeByte(chipsel, *buffer);
}
}
}
示例7: WriteFSKbyte
void WriteFSKbyte(int8 DATA)
{
int8 RGIT = 0;
int16 temp = 0xB800;
output_float(_SDO);
output_low(_SCK);
temp|= DATA;
Loop: SCK = false;
RF_EN = false;
output_low(_SDA);
SCK = true;
RGIT = (SDO==true); //Polling SDO
SCK = false;
output_high(_SDA);
RF_EN = true;
if (RGIT==0){
goto Loop;
} else {
RGIT=false;
WriteCMD(temp);
}
}
示例8: write_default_param_file
void write_default_param_file() {
/* all LEDs for 1.5 seconds */
#if 0
timers.led_on_a=150;
timers.led_on_b=150;
timers.led_on_c=150;
timers.led_on_d=150;
#else
output_high(LED_A);
output_high(LED_B);
output_high(LED_C);
output_high(LED_D);
delay_ms(1500);
output_low(LED_A);
output_low(LED_B);
output_low(LED_C);
output_low(LED_D);
#endif
set_config();
/* write them so next time we use from EEPROM */
write_param_file();
}
示例9: set_pot
set_pot (int pot_num, int new_value) {
byte i;
byte cmd[3];
if (pot_num >= NUM_POTS)
return;
pots[pot_num] = new_value;
cmd[0]=pots[0];
cmd[1]=pots[1];
cmd[2]=0;
for(i=1;i<=7;i++)
shift_left(cmd,3,0);
output_high(RST1);
delay_us(2);
for(i=1;i<=17;i++) {
output_bit(DI, shift_left(cmd,3,0));
delay_us(2);
output_high(CLK);
delay_us(2);
if(i==17)
output_low(RST1);
output_low(CLK);
delay_us(2);
}
}
示例10: main
void main()
{
setup_oscillator(OSC_NORMAL);
while (true)
{
output_A(0xff);
output_B(0xff);
output_C(0xff);
output_D(0xff);
output_E(0xff);
output_high(pin_C1);
output_high(pin_C0);
output_high(pin_A4);
Delay_ms(500);
output_A(0x0);
output_B(0x0);
output_C(0x0);
output_D(0x0);
output_E(0x0);
output_low(pin_C1);
output_low(pin_C0);
output_low(pin_A4);
Delay_ms(500);
}
}
示例11: write_dac
void write_dac(int16 data) {
BYTE cmd[3];
BYTE i;
cmd[0]=data;
cmd[1]=(data>>8);
cmd[2]=0x03;
output_high(DAC_LDAC);
output_low(DAC_CLK);
output_low(DAC_CS);
for(i=0; i<=23; ++i)
{
if(i<4 || (i>7 && i<12))
shift_left(cmd,3,0);
else
{
output_bit(DAC_DI, shift_left(cmd,3,0));
output_high(DAC_CLK);
output_low(DAC_CLK);
}
}
output_high(DAC_CS);
output_low(DAC_LDAC);
delay_us(10);
output_HIGH(DAC_LDAC);
}
示例12: RTCC_isr
void RTCC_isr() //function interrupción TMR0
{ set_TIMER0(5); //inicializa el timer0 para que cuente 0.2 us
output_toggle(PIN_B2);
set_TIMER0(5); //inicializa el timer0 para que cuente 0.2 us
cont++;
//Giro en un sentido
if(input(PIN_B0)==1){
if ((int16)cont==(int16)10){ cont=0;
output_high(PIN_B3);}
if((int16)comp1==(int16)cont){
output_low(PIN_B3);}
}
if (input(PIN_B0)==0)
output_low(PIN_B3);
//--------------Giro opuesto----------------
if(input(PIN_B1)==1){
if ((int16)cont==(int16)10){ cont=0;
output_high(PIN_B4);}
if((int16)comp1==(int16)cont){
output_low(PIN_B4);}
}
if (input(PIN_B1)==0)
output_low(PIN_B4);
}
示例13: init_ADNS2051
//-----------------------------------------------------------------------
// init_ADNS2051()
//-----------------------------------------------------------------------
//
void init_ADNS2051() {
int i;
// Initialisation
setup_timer_1(T1_INTERNAL | T1_DIV_BY_8);
posX = 0;
posY = 0;
DeltaX = 0;
DeltaY = 0;
teller = 0;
teller1 = 0;
for(i=0;i<DELTA_LOG_SIZE;i++){
lastX[i] = 0;
lastY[i] = 0;
}
// Init ADNS-2051 pins
output_high(SDIO);
output_high(SCLK);
output_low(PD);
delay_ms(2);
// Resync
output_high(PD);
delay_ms(2);
output_low(PD);
}
示例14: stop
void stop(void)
{
output_low(PORTB,PB2);
output_low(PORTB,PB1);
output_low(PORTB,PB4);
BUZZER_ON = 0;
}
示例15: LEDTest4
void LEDTest4()
{
int I_B, I_B2, value;
for(I_B2 = 0; I_B2 < 2; I_B2++){
value = 1;
for (I_B = 0; I_B < 8; I_B++){
if (I_B % 2 == 0){
Portout(value, 0);
output_low (Ledb_p);
output_high (Ledm_p);
output_high (Ledt_p);
delay_ms (200);
}
else{
Portout(0, value);
output_high (Ledb_p);
output_high (Ledm_p);
output_low (Ledt_p);
delay_ms (200);
}
value = (value*2) + 1;
}
}
}