{"id":3013,"date":"2021-02-12T19:08:09","date_gmt":"2021-02-12T18:08:09","guid":{"rendered":"https:\/\/www.macerobotics.com\/?p=3013"},"modified":"2021-02-12T19:08:09","modified_gmt":"2021-02-12T18:08:09","slug":"controle-dune-led-avec-un-%c2%b5c-stm32","status":"publish","type":"post","link":"http:\/\/www.macerobotics.com\/?p=3013","title":{"rendered":"Contr\u00f4le d&#8217;une led avec un \u00b5C STM32"},"content":{"rendered":"<p>Exemple de contr\u00f4le d&#8217;une led sur le port PE8 avec un microcontr\u00f4leur STM32F407 :<\/p>\n<div class=\"code-embed-wrapper\"> <pre class=\"language-c code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-c code-embed-code\">void led_init(void)<br\/>{<br\/>GPIO_InitTypeDef GPIO_InitStruct;<br\/><br\/>\t  \/\/ configuration en sortie<br\/>\t  GPIO_InitStruct.Pin = GPIO_PIN_8;<br\/>\t  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;<br\/>\t  GPIO_InitStruct.Pull = GPIO_NOPULL;<br\/>\t  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;<br\/>\t  HAL_GPIO_Init(GPIOE, &amp;GPIO_InitStruct);<br\/><br\/>}<br\/><br\/>void led_control(GPIO_PinState state_led)<br\/>{<br\/>\tHAL_GPIO_WritePin(GPIOE, GPIO_PIN_8, state_led);<br\/>}<br\/><br\/>void led_toggle(void)<br\/>{<br\/>  HAL_GPIO_TogglePin(GPIOE, GPIO_PIN_8);<br\/>}<\/code><\/pre> <div class=\"code-embed-infos\"> <\/div> <\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exemple de contr\u00f4le d&#8217;une led sur le port PE8 avec un microcontr\u00f4leur STM32F407 : &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[],"class_list":["post-3013","post","type-post","status-publish","format-standard","hentry","category-stm32"],"_links":{"self":[{"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts\/3013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3013"}],"version-history":[{"count":1,"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts\/3013\/revisions"}],"predecessor-version":[{"id":3014,"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts\/3013\/revisions\/3014"}],"wp:attachment":[{"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3013"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}