本文整理汇总了C++中Joystick_Init函数的典型用法代码示例。如果您正苦于以下问题:C++ Joystick_Init函数的具体用法?C++ Joystick_Init怎么用?C++ Joystick_Init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Joystick_Init函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int main(void)
{
uint_reg_t Dummy;
/* =============================
* Buttons Compile Check
* ============================= */
// cppcheck-suppress redundantAssignment
Dummy = BUTTONS_BUTTON1;
Buttons_Init();
// cppcheck-suppress redundantAssignment
Dummy = Buttons_GetStatus();
Buttons_Disable();
/* =============================
* Dataflash Compile Check
* ============================= */
// cppcheck-suppress redundantAssignment
Dummy = DATAFLASH_TOTALCHIPS + DATAFLASH_NO_CHIP + DATAFLASH_CHIP1 + DATAFLASH_PAGE_SIZE + DATAFLASH_PAGES;
Dataflash_Init();
Dataflash_TransferByte(0);
Dataflash_SendByte(0);
// cppcheck-suppress redundantAssignment
Dummy = Dataflash_ReceiveByte();
// cppcheck-suppress redundantAssignment
Dummy = Dataflash_GetSelectedChip();
Dataflash_SelectChip(DATAFLASH_CHIP1);
Dataflash_DeselectChip();
Dataflash_SelectChipFromPage(0);
Dataflash_ToggleSelectedChipCS();
Dataflash_WaitWhileBusy();
Dataflash_SendAddressBytes(0, 0);
/* =============================
* LEDs Compile Check
* ============================= */
// cppcheck-suppress redundantAssignment
Dummy = LEDS_LED1 + LEDS_LED2 + LEDS_LED3 + LEDS_LED4;
LEDs_Init();
LEDs_TurnOnLEDs(LEDS_ALL_LEDS);
LEDs_TurnOffLEDs(LEDS_ALL_LEDS);
LEDs_SetAllLEDs(LEDS_ALL_LEDS);
LEDs_ChangeLEDs(LEDS_ALL_LEDS, LEDS_NO_LEDS);
LEDs_ToggleLEDs(LEDS_ALL_LEDS);
// cppcheck-suppress redundantAssignment
Dummy = LEDs_GetLEDs();
LEDs_Disable();
/* =============================
* Joystick Compile Check
* ============================= */
// cppcheck-suppress redundantAssignment
Dummy = JOY_LEFT + JOY_RIGHT + JOY_UP + JOY_DOWN + JOY_PRESS;
Joystick_Init();
// cppcheck-suppress redundantAssignment
Dummy = Joystick_GetStatus();
Joystick_Disable();
(void)Dummy;
}
开发者ID:2k0ri,项目名称:qmk_firmware,代码行数:60,代码来源:Test.c
示例2: SetupHardware
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
LEDs_Init();
Joystick_Init();
Buttons_Init();
SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING | SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
Dataflash_Init();
USB_Init();
/* Check if the Dataflash is working, abort if not */
if (!(DataflashManager_CheckDataflashOperation()))
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
for(;;);
}
/* Clear Dataflash sector protections, if enabled */
DataflashManager_ResetDataflashProtections();
}
开发者ID:DuinoPilot,项目名称:lufa,代码行数:28,代码来源:MassStorageKeyboard.c
示例3: main
/** Main program entry point. This routine configures the hardware required by the application, then
* starts the scheduler to run the application tasks.
*/
int main(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
Joystick_Init();
LEDs_Init();
Buttons_Init();
/* Millisecond timer initialization, with output compare interrupt enabled for the idle timing */
OCR0A = 0x7D;
TCCR0A = (1 << WGM01);
TCCR0B = ((1 << CS01) | (1 << CS00));
TIMSK0 = (1 << OCIE0A);
/* Indicate USB not ready */
UpdateStatus(Status_USBNotReady);
/* Initialize Scheduler so that it can be used */
Scheduler_Init();
/* Initialize USB Subsystem */
USB_Init();
/* Scheduling - routine never returns, so put this last in the main function */
Scheduler_Start();
}
开发者ID:hanshuebner,项目名称:ayce1,代码行数:35,代码来源:Mouse.c
示例4: main
/** Main program entry point. This routine configures the hardware required by the application, then
* starts the scheduler to run the application tasks.
*/
int main(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
Joystick_Init();
LEDs_Init();
Buttons_Init();
/* Indicate USB not ready */
UpdateStatus(Status_USBNotReady);
/* Initialize Scheduler so that it can be used */
Scheduler_Init();
/* Initialize USB Subsystem */
USB_Init();
/* Scheduling - routine never returns, so put this last in the main function */
Scheduler_Start();
}
开发者ID:unnamet,项目名称:estick-jtag,代码行数:29,代码来源:Joystick.c
示例5: main
/** Main program entry point. This routine configures the hardware required by the application, then
* starts the scheduler to run the USB management task.
*/
int main(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable Clock Division */
SetSystemClockPrescaler(0);
/* Hardware Initialization */
Joystick_Init();
LEDs_Init();
HWB_Init();
/* Millisecond timer initialization, with output compare interrupt enabled for the idle timing */
OCR0A = 0x7D;
TCCR0A = (1 << WGM01);
TCCR0B = ((1 << CS01) | (1 << CS00));
TIMSK0 = (1 << OCIE0A);
/* Indicate USB not ready */
UpdateStatus(Status_USBNotReady);
/* Initialize USB Subsystem */
USB_Init();
/* Main program code loop */
for (;;)
{
/* No main code -- all USB code is interrupt driven */
}
}
开发者ID:Limpinho0,项目名称:motmot-camtrig,代码行数:35,代码来源:MouseFullInt.c
示例6: SetupHardware
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware()
{
#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
#elif (ARCH == ARCH_XMEGA)
/* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
/* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
#endif
/* Hardware Initialization */
Joystick_Init();
LEDs_Init();
USB_Init();
}
开发者ID:BirdBrainTechnologies,项目名称:HummingbirdDuoFirmware,代码行数:27,代码来源:KeyboardMouseMultiReport.c
示例7: SetupHardware
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
bsp_init();
LEDs_Init();
Buttons_Init();
Joystick_Init();
USB_Init();
#if defined(USB_DEVICE_ROM_DRIVER)
UsbdHid_Init();
#endif
USB_Connect();
}
开发者ID:TCollier92,项目名称:HAPR,代码行数:13,代码来源:Mouse.c
示例8: main
int main(void)
{
uint_reg_t Dummy;
/* =============================
* Buttons Compile Check
* ============================= */
Buttons_Init();
// cppcheck-suppress redundantAssignment
Dummy = Buttons_GetStatus();
Buttons_Disable();
/* =============================
* Dataflash Compile Check
* ============================= */
Dataflash_Init();
Dataflash_TransferByte(0);
Dataflash_SendByte(0);
// cppcheck-suppress redundantAssignment
Dummy = Dataflash_ReceiveByte();
// cppcheck-suppress redundantAssignment
Dummy = Dataflash_GetSelectedChip();
Dataflash_SelectChip(0);
Dataflash_DeselectChip();
Dataflash_SelectChipFromPage(0);
Dataflash_ToggleSelectedChipCS();
Dataflash_WaitWhileBusy();
Dataflash_SendAddressBytes(0, 0);
/* =============================
* LEDs Compile Check
* ============================= */
LEDs_Init();
LEDs_TurnOnLEDs(LEDS_ALL_LEDS);
LEDs_TurnOffLEDs(LEDS_ALL_LEDS);
LEDs_SetAllLEDs(LEDS_ALL_LEDS);
LEDs_ChangeLEDs(LEDS_ALL_LEDS, LEDS_NO_LEDS);
LEDs_ToggleLEDs(LEDS_ALL_LEDS);
// cppcheck-suppress redundantAssignment
Dummy = LEDs_GetLEDs();
LEDs_Disable();
/* =============================
* Joystick Compile Check
* ============================= */
Joystick_Init();
// cppcheck-suppress redundantAssignment
Dummy = Joystick_GetStatus();
Joystick_Disable();
(void)Dummy;
}
开发者ID:chicagoedt,项目名称:Firmware,代码行数:52,代码来源:Test.c
示例9: SetupHardware
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
Joystick_Init();
LEDs_Init();
USB_Init();
}
开发者ID:AmesianX,项目名称:OpenPCR,代码行数:15,代码来源:DualVirtualSerial.c
示例10: SetupHardware
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
Joystick_Init();
LEDs_Init();
USB_Init();
SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING | SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
}
开发者ID:Saectar,项目名称:manga-screen,代码行数:16,代码来源:VirtualSerialMouse.c
示例11: SetupHardware
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
SerialStream_Init(9600, false);
LEDs_Init();
Joystick_Init();
Buttons_Init();
USB_Init(USB_MODE_UID);
}
开发者ID:emcute0319,项目名称:ir-usb-kbd,代码行数:17,代码来源:MouseHostDevice.c
示例12: main
int main(){
int muxpin[4] = {19,18,17,16};
Uart_Init(57600);
Uart_Print("Uart Inited\n\r");
SPI_InitMaster(16);
Mux_Init(&MBMux,20,muxpin);
Encoder_Init(&MBMux);
Uart_Print("SPI Encoder Inited\n\r");
Joystick_Init();
GPIO_Init(31,OUTPUT);
Timer_Init(0,100,Timer_Rountine);
return 0;
}
开发者ID:RBC-CUHK,项目名称:RBC2011,代码行数:17,代码来源:main.c
示例13: SetupHardware
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
#endif
/* Hardware Initialization */
LEDs_Init();
USB_Init();
Joystick_Init();
Buttons_Init();
}
开发者ID:abcminiuser,项目名称:lufa,代码行数:18,代码来源:MissileLauncher.c
示例14: SetupHardware
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
LEDs_Init();
Joystick_Init();
SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING | SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
Dataflash_Init();
USB_Init();
/* Clear Dataflash sector protections, if enabled */
DataflashManager_ResetDataflashProtections();
}
开发者ID:Codingboy,项目名称:ucuni,代码行数:20,代码来源:VirtualSerialMassStorage.c
示例15: SetupHardware
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
Serial_Init(9600, false);
LEDs_Init();
Joystick_Init();
Buttons_Init();
USB_Init(USB_MODE_UID);
/* Create a stdio stream for the serial port for stdin and stdout */
Serial_CreateStream(NULL);
}
开发者ID:davidk,项目名称:lufa-lib,代码行数:20,代码来源:MouseHostDevice.c
示例16: I_Init
boolean I_Init(void)
{
if(initOk)
return true; // Already initialized.
#ifdef __CLIENT__
// Select drivers.
iMouse = &qtMouse;
#ifdef WIN32
iMouse = &win32Mouse;
DirectInput_Init();
#endif
Mouse_Init();
Joystick_Init();
#endif // __CLIENT__
initOk = true;
return true;
}
开发者ID:cmbruns,项目名称:Doomsday-Engine,代码行数:22,代码来源:sys_input.cpp
示例17: main
/**
* @brief Main program.
* @param None
* @retval None
*/
int main(void)
{
/*!< At this stage the microcontroller clock setting is already configured,
this is done through SystemInit() function which is called from startup
file (startup_stm32f4xx.s) before to branch to application main.
To reconfigure the default setting of SystemInit() function, refer to
system_stm32f4xx.c file
*/
/* Setup STM32 system (clock, PLL and Flash configuration) */
SystemInit();
/* GLCD init */
GLCD_PowerUpInit((pInt8U)IAR_Logo.pPicStream);
GLCD_Backlight(BACKLIGHT_ON);
DelayResolution100us(5000);
GLCD_PowerUpInit((pInt8U)STM32_Logo.pPicStream);
GLCD_SetFont(&Terminal_9_12_6,0x000F00,0x00FF0);
GLCD_TextSetPos(4,6);
GLCD_print("STM32F407ZG-SK");
GLCD_Backlight(BACKLIGHT_ON);
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
/* Menu init */
Menu_Init();
Joystick_Init();
DisplayMenu();
/* Infinite loop */
while (1)
{
}
}
开发者ID:mskamoona,项目名称:IAR-STM32F407ZG-SK,代码行数:43,代码来源:main.c
示例18: SetupHardware
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
#elif (ARCH == ARCH_XMEGA)
/* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
/* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
#endif
/* Hardware Initialization */
LEDs_Init();
Joystick_Init();
Buttons_Init();
Dataflash_Init();
USB_Init();
/* Check if the Dataflash is working, abort if not */
if (!(DataflashManager_CheckDataflashOperation()))
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
for(;;);
}
/* Clear Dataflash sector protections, if enabled */
DataflashManager_ResetDataflashProtections();
}
开发者ID:Steffen-Engel,项目名称:lufa,代码行数:39,代码来源:MassStorageKeyboard.c
示例19: SetupHardware
/** Configures the board hardware and chip peripherals for the demo's functionality. */
inline static void SetupHardware(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
LEDs_Init();
Buttons_Init(); //button HWB
Joystick_Init();
//gate driving output - PORTC.6 / PWM-A Timer3
DDRC |= (1<<PC6);
PORTC &= ~(1<<PC6);
Init_PWM_timer();
/* conversion mode (free running or single) and prescaler masks
* ACDSRA: start ADC, clock prescaler, interrupt, trigger enable, start single conv */
ADC_Init( ADC_SINGLE_CONVERSION | ADC_PRESCALE_128);
/* Must setup the ADC channel to read beforehand */
ADC_SetupChannel(3);
ADC_SetupChannel(4);
/* Start the ADC conversion in free running mode
* ADMUX and Vref, adjust, sel mux channel with gain
*
*/
//ADC_StartReading(ADC_REFERENCE_INT2560MV | ADC_RIGHT_ADJUSTED | ADC_1100MV_BANDGAP);
//Temperature_Init();
//Dataflash_Init();
SerialStream_Init(9600, false);
}
开发者ID:Maciej1975,项目名称:Histogram,代码行数:38,代码来源:adcRS.c
注:本文中的Joystick_Init函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论