本文整理汇总了C++中rcc_periph_clock_enable函数的典型用法代码示例。如果您正苦于以下问题:C++ rcc_periph_clock_enable函数的具体用法?C++ rcc_periph_clock_enable怎么用?C++ rcc_periph_clock_enable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rcc_periph_clock_enable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: clock_setup
static void clock_setup(void)
{
/* Enable GPIOG clock for LED & USARTs. */
rcc_periph_clock_enable(RCC_GPIOG);
rcc_periph_clock_enable(RCC_GPIOB);
/* Enable clocks for USART1. */
rcc_periph_clock_enable(RCC_USART3);
}
开发者ID:insane-adding-machines,项目名称:unicore-mx-examples,代码行数:9,代码来源:usart_irq.c
示例2: i2c_led_platform_init
void i2c_led_platform_init(void)
{
// Enable I2C2
rcc_periph_clock_enable(RCC_I2C2);
rcc_periph_clock_enable(RCC_DMA1);
// Setup I2C port
setup_i2c_port(I2C_400KHz);
}
开发者ID:novatechweb,项目名称:nt133,代码行数:9,代码来源:platform_i2c_led.c
示例3: clock_setup
static void clock_setup(void)
{
/* Enable GPIOD clock for LED & USARTs. */
rcc_periph_clock_enable(RCC_GPIOD);
rcc_periph_clock_enable(RCC_GPIOA);
/* Enable clocks for USART2. */
rcc_periph_clock_enable(RCC_USART2);
}
开发者ID:BuFran,项目名称:libopencm3-examples,代码行数:9,代码来源:usart.c
示例4: clock_setup
/* Set STM32 to 168 MHz. */
static void clock_setup(void)
{
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
/* Enable GPIOD, GPIOG, and GPIOK clock. */
rcc_periph_clock_enable(RCC_GPIOD);
rcc_periph_clock_enable(RCC_GPIOG);
rcc_periph_clock_enable(RCC_GPIOK);
}
开发者ID:ChuckM,项目名称:stm32f469i,代码行数:10,代码来源:blink_fancy.c
示例5: clock_setup
/*--------------------------------------------------------------------------*/
static void clock_setup(void)
{
rcc_clock_setup_in_hse_8mhz_out_72mhz();
/* Enable GPIOA, GPIOB, GPIOC clock. */
rcc_periph_clock_enable(RCC_GPIOA);
rcc_periph_clock_enable(RCC_GPIOB);
rcc_periph_clock_enable(RCC_GPIOC);
}
开发者ID:JamesLinus,项目名称:ARM-Ports,代码行数:10,代码来源:spi1-test.c
示例6: gpio_setup
/*--------------------------------------------------------------------*/
void gpio_setup(void)
{
rcc_periph_clock_enable(RCC_GPIOA);
rcc_periph_clock_enable(RCC_GPIOC);
rcc_periph_clock_enable(RCC_AFIO);
/* Digital Test outputs PC0 and PC1 */
gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_50_MHZ,
GPIO_CNF_OUTPUT_PUSHPULL, GPIO0 | GPIO1);
}
开发者ID:JamesLinus,项目名称:ARM-Ports,代码行数:10,代码来源:test-dac-dma-et-stamp-stm32f103.c
示例7: rcc_setup
static void rcc_setup(void)
{
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_120MHZ]);
/* Enable GPIOD clock for onboard leds. */
rcc_periph_clock_enable(RCC_GPIOD);
/* Enable rng clock */
rcc_periph_clock_enable(RCC_RNG);
}
开发者ID:ChuckM,项目名称:libopencm3-examples,代码行数:10,代码来源:random.c
示例8: disconnect_usb
void disconnect_usb(void)
{
/* Disconnect USB cable by resetting USB Device and pulling USB_DP low*/
rcc_periph_reset_pulse(RST_USB);
rcc_periph_clock_enable(RCC_USB);
rcc_periph_clock_enable(RCC_GPIOA);
gpio_clear(GPIOA, GPIO12);
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_2_MHZ,
GPIO_CNF_OUTPUT_OPENDRAIN, GPIO12);
}
开发者ID:DanielO,项目名称:blackmagic,代码行数:10,代码来源:platform.c
示例9: gpio_setup
static void gpio_setup(void)
{
/* Enable GPIOB clock. */
rcc_periph_clock_enable(RCC_GPIOA);
rcc_periph_clock_enable(RCC_GPIOB);
/* set pins to output mode, push pull */
gpio_mode_setup(LED_RED_PORT, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, LED_RED_PIN);
gpio_mode_setup(LED_GREEN_PORT, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, LED_GREEN_PIN);
}
开发者ID:insane-adding-machines,项目名称:unicore-mx-examples,代码行数:10,代码来源:miniblink.c
示例10: clock_setup
/* Set STM32 to 72 MHz. */
static void clock_setup(void)
{
rcc_clock_setup_in_hse_12mhz_out_72mhz();
/* Enable GPIOA, GPIOB, GPIOC, and AFIO clocks. */
rcc_periph_clock_enable(RCC_GPIOA);
rcc_periph_clock_enable(RCC_GPIOB);
rcc_periph_clock_enable(RCC_GPIOC);
rcc_periph_clock_enable(RCC_AFIO);
}
开发者ID:BuFran,项目名称:libopencm3-examples,代码行数:11,代码来源:fancyblink.c
示例11: usb_tmc_setup_pre_arch
void usb_tmc_setup_pre_arch(void)
{
rcc_periph_clock_enable(RCC_GPIOA);
rcc_periph_clock_enable(USB_RCC);
/* Not sure if we need 9 for ID or even if we need this at all */
gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE,
GPIO9 | GPIO11 | GPIO12);
gpio_set_af(GPIOA, GPIO_AF10, GPIO9 | GPIO11 | GPIO12);
}
开发者ID:antboard,项目名称:discotmc,代码行数:10,代码来源:usb_tmc.c
示例12: gpio_setup
static void gpio_setup(void)
{
rcc_periph_clock_enable(RCC_GPIOE);
rcc_periph_clock_enable(RCC_GPIOA);
gpio_mode_setup(GPIOE, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE,
GPIO8 | GPIO9 | GPIO10 | GPIO11 | GPIO12 | GPIO13 |
GPIO14 | GPIO15);
gpio_mode_setup(GPIOE, GPIO_MODE_OUTPUT, GPIO_PUPD_PULLUP, GPIO0); //ADC_EOC
}
开发者ID:t3chnolochic,项目名称:thesis,代码行数:10,代码来源:ADC_DAC.c
示例13: gpio_setup
static void gpio_setup(void)
{
rcc_periph_clock_enable(RCC_GPIOE);
rcc_periph_clock_enable(RCC_GPIOD); //timer
gpio_set_af(GPIOD, GPIO_AF2, GPIO2); //timer
gpio_mode_setup(GPIOE, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE,
GPIO8 | GPIO9 | GPIO10 | GPIO11 | GPIO12 | GPIO13 |
GPIO14 | GPIO15);
gpio_mode_setup(GPIOD, GPIO_MODE_AF, GPIO_PUPD_PULLUP,
GPIO2); //timer
}
开发者ID:t3chnolochic,项目名称:thesis,代码行数:11,代码来源:oscope.c
示例14: gpio_setup
/*--------------------------------------------------------------------*/
static void gpio_setup(void)
{
/* Port A and C are on AHB1 */
rcc_periph_clock_enable(RCC_GPIOA);
rcc_periph_clock_enable(RCC_GPIOC);
/* Set the digital test output on PC1 */
gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO1);
gpio_set_output_options(GPIOC, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, GPIO1);
/* Set PA4 for DAC channel 1 to analogue, ignoring drive mode. */
gpio_mode_setup(GPIOA, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO4);
}
开发者ID:ChuckM,项目名称:libopencm3-examples,代码行数:12,代码来源:dac-dma.c
示例15: clock_setup
static void clock_setup(void) {
rcc_clock_setup_in_hse_8mhz_out_72mhz();
/* Enable GPIOC clock (for LED GPIOs). */
rcc_periph_clock_enable(RCC_GPIOC);
/* Enable clocks for GPIO port A (for GPIO_USART1_TX) and USART1. */
rcc_periph_clock_enable(RCC_GPIOA);
rcc_periph_clock_enable(RCC_AFIO);
rcc_periph_clock_enable(RCC_USART1);
}
开发者ID:GBert,项目名称:misc,代码行数:11,代码来源:latency-tester.c
示例16: main
int main(void)
{
double flash_rate = 3.14159;
char buf[128];
uint32_t done_time;
/* ../util/retarget.c has automatically set up the clock rate, systick
* and made the virtual COM port on the board into the "console" or
* standard output and input.
*
* When the output is sent to standard error, it is highlighted in a
* different color (if you have a color xterm)
*/
fprintf(stderr, "\nSTM32F469-Discovery : ");
printf("Retargeting LIBC example.\n");
/* This is the LED on the board */
rcc_periph_clock_enable(RCC_GPIOD);
rcc_periph_clock_enable(RCC_GPIOG);
rcc_periph_clock_enable(RCC_GPIOK);
gpio_mode_setup(GPIOD, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO5 | GPIO4);
gpio_mode_setup(GPIOG, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO6);
gpio_mode_setup(GPIOK, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO3);
led_state = 0; /* useful when restarting in gdb */
/* You can create a running dialog with the console */
printf("We're going to start blinking the LED, between 0 and 300 times per\n");
printf("second.\n");
while (1) {
printf("Please enter a flash rate: ");
fflush(stdout);
fgets(buf, 128, stdin);
buf[strlen(buf) - 1] = '\0';
flash_rate = atof(buf);
if (flash_rate == 0) {
printf("Was expecting a number greater than 0 and less than 300.\n");
printf("but got '%s' instead\n", buf);
} else if (flash_rate > 300.0) {
printf("The number should be less than 300.\n");
} else {
break;
}
}
/* MS per flash */
done_time = (int) (500 / flash_rate);
printf("\nThe closest we can come will be %f flashes per second\n", 500.0 / done_time);
printf("With %d MS between states\n", (int) done_time);
printf("Press ^C to restart this demo.\n");
while (1) {
msleep(done_time);
rotate_leds();
}
}
开发者ID:ChuckM,项目名称:stm32f469i,代码行数:54,代码来源:main.c
示例17: msc_target_init
void msc_target_init(void)
{
rcc_clock_setup_hse_3v3(&rcc_hse_25mhz_3v3);
rcc_periph_clock_enable(RCC_GPIOA);
rcc_periph_clock_enable(RCC_OTGFS);
gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE,
GPIO9 | GPIO11 | GPIO12);
gpio_set_af(GPIOA, GPIO_AF10, GPIO9 | GPIO11 | GPIO12);
}
开发者ID:insane-adding-machines,项目名称:unicore-mx-examples,代码行数:11,代码来源:msc-target.c
示例18: clock_setup
static void clock_setup(void)
{
rcc_clock_setup_in_hse_8mhz_out_72mhz();
/* Enable TIM1 clock. */
rcc_periph_clock_enable(RCC_TIM1);
/* Enable GPIOC, Alternate Function clocks. */
rcc_periph_clock_enable(RCC_GPIOA);
rcc_periph_clock_enable(RCC_AFIO);
}
开发者ID:BuFran,项目名称:libopencm3-examples,代码行数:11,代码来源:pwmleds.c
示例19: usb_setup
static void usb_setup(void)
{
/* Enable clocks for GPIO port A (for GPIO_USART2_TX) and USART2. */
rcc_usb_prescale_1();
rcc_periph_clock_enable(RCC_USB);
rcc_periph_clock_enable(RCC_GPIOA);
/* Setup GPIO pin GPIO_USART2_TX/GPIO9 on GPIO port A for transmit. */
gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO11 | GPIO12);
gpio_set_af(GPIOA, GPIO_AF14, GPIO11| GPIO12);
}
开发者ID:jhgorse,项目名称:unicore-mx-examples,代码行数:11,代码来源:cdcacm-target.c
示例20: clock_setup
static void clock_setup(void)
{
// Set STM32 to 168 MHz
rcc_clock_setup_hse_3v3(&hse_25mhz_3v3[CLOCK_3V3_168MHZ]);
// Enable GPIO clock
rcc_periph_clock_enable(RCC_GPIOA);
rcc_periph_clock_enable(RCC_GPIOB);
rcc_periph_clock_enable(RCC_GPIOC);
rcc_periph_clock_enable(RCC_GPIOD);
}
开发者ID:froj,项目名称:MAVRIC_Library,代码行数:11,代码来源:mavrimini.cpp
注:本文中的rcc_periph_clock_enable函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论