{"id":43317,"date":"2023-09-28T16:06:04","date_gmt":"2023-09-28T08:06:04","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=43317"},"modified":"2023-09-28T16:06:04","modified_gmt":"2023-09-28T08:06:04","slug":"sqjbldy","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/43317.html","title":{"rendered":"STM32\u5168\u5c40\u53d8\u91cf\u5b9a\u4e49"},"content":{"rendered":"

  STM32\u5168\u5c40\u53d8\u91cf\u5b9a\u4e49\u662f\u4e00\u79cd\u4f7f\u7528STM32\u5fae\u63a7\u5236\u5668\u7684\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u7ba1\u7406\u5185\u5b58\u548c\u63d0\u9ad8\u7a0b\u5e8f\u7684\u53ef\u7ef4\u62a4\u6027\u3002<\/strong>\u672c\u6587\u5c06\u4ecb\u7ecdSTM32\u5168\u5c40\u53d8\u91cf\u5b9a\u4e49\u7684\u6982\u5ff5\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528\u5b83\u6765\u5b9e\u73b0\u66f4\u597d\u7684\u7a0b\u5e8f\u7ba1\u7406\u3002<\/p>\n

\u4ec0\u4e48\u662fSTM32\u5168\u5c40\u53d8\u91cf\u5b9a\u4e49\uff1f<\/h2>\n

  STM32\u5168\u5c40\u53d8\u91cf\u5b9a\u4e49\u662f\u4e00\u79cd\u4f7f\u7528STM32\u5fae\u63a7\u5236\u5668\u7684\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u7ba1\u7406\u5185\u5b58\u548c\u63d0\u9ad8\u7a0b\u5e8f\u7684\u53ef\u7ef4\u62a4\u6027\u3002<\/strong>\u5b83\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5c06\u53d8\u91cf\u58f0\u660e\u4e3a\u5168\u5c40\u53d8\u91cf\uff0c\u800c\u4e0d\u662f\u5c40\u90e8\u53d8\u91cf\uff0c\u4ee5\u4fbf\u5728\u7a0b\u5e8f\u7684\u4e0d\u540c\u90e8\u5206\u4e4b\u95f4\u5171\u4eab\u53d8\u91cf\u7684\u503c\u3002<\/p>\n

\u5982\u4f55\u5b9e\u73b0STM32\u5168\u5c40\u53d8\u91cf\u5b9a\u4e49\uff1f<\/h2>\n

  1.\u5b9a\u4e49\u53d8\u91cf<\/h3>\n

  \u9996\u5148\uff0c\u5728STM32\u7a0b\u5e8f\u4e2d\uff0c\u4f60\u9700\u8981\u5b9a\u4e49\u53d8\u91cf\uff0c\u5c06\u5176\u58f0\u660e\u4e3a\u5168\u5c40\u53d8\u91cf\u3002\u5b9a\u4e49\u53d8\u91cf\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n

    \n
  • \u5728\u7a0b\u5e8f\u7684\u5934\u6587\u4ef6\u4e2d\u5b9a\u4e49\u53d8\u91cf\uff0c\u5982\uff1aint global_variable;<\/code><\/li>\n
  • \u5c06\u53d8\u91cf\u58f0\u660e\u4e3a\u5168\u5c40\u53d8\u91cf\uff0c\u5982\uff1aextern int global_variable;<\/code><\/li>\n<\/ul>\n

      2.\u4f7f\u7528\u53d8\u91cf<\/h3>\n

      \u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u5728\u7a0b\u5e8f\u7684\u4e0d\u540c\u90e8\u5206\u4f7f\u7528\u5168\u5c40\u53d8\u91cf\uff0c\u4ee5\u4fbf\u5728\u7a0b\u5e8f\u7684\u4e0d\u540c\u90e8\u5206\u4e4b\u95f4\u5171\u4eab\u53d8\u91cf\u7684\u503c\u3002\u4f7f\u7528\u5168\u5c40\u53d8\u91cf\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n

      \n
    • \u5728\u7a0b\u5e8f\u7684\u5934\u6587\u4ef6\u4e2d\u5f15\u7528\u5168\u5c40\u53d8\u91cf\uff0c\u5982\uff1aextern int global_variable;<\/code><\/li>\n
    • \u5728\u7a0b\u5e8f\u7684\u4e0d\u540c\u90e8\u5206\u4f7f\u7528\u5168\u5c40\u53d8\u91cf\uff0c\u5982\uff1aint my_variable = global_variable;<\/code><\/li>\n<\/ul>\n

        3.\u66f4\u65b0\u53d8\u91cf<\/h3>\n

        \u6700\u540e\uff0c\u4f60\u9700\u8981\u66f4\u65b0\u5168\u5c40\u53d8\u91cf\u7684\u503c\uff0c\u4ee5\u4fbf\u5728\u7a0b\u5e8f\u7684\u4e0d\u540c\u90e8\u5206\u4e4b\u95f4\u5171\u4eab\u53d8\u91cf\u7684\u503c\u3002\u66f4\u65b0\u5168\u5c40\u53d8\u91cf\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n

        \n
      • \u5728\u7a0b\u5e8f\u7684\u5934\u6587\u4ef6\u4e2d\u5f15\u7528\u5168\u5c40\u53d8\u91cf\uff0c\u5982\uff1aextern int global_variable;<\/code><\/li>\n
      • \u5728\u7a0b\u5e8f\u7684\u4e0d\u540c\u90e8\u5206\u66f4\u65b0\u5168\u5c40\u53d8\u91cf\uff0c\u5982\uff1aglobal_variable = my_variable;<\/code><\/li>\n<\/ul>\n

        \u603b\u7ed3<\/h2>\n

          STM32\u5168\u5c40\u53d8\u91cf\u5b9a\u4e49\u662f\u4e00\u79cd\u4f7f\u7528STM32\u5fae\u63a7\u5236\u5668\u7684\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u7ba1\u7406\u5185\u5b58\u548c\u63d0\u9ad8\u7a0b\u5e8f\u7684\u53ef\u7ef4\u62a4\u6027\u3002<\/strong>\u5b83\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5c06\u53d8\u91cf\u58f0\u660e\u4e3a\u5168\u5c40\u53d8\u91cf\uff0c\u800c\u4e0d\u662f\u5c40\u90e8\u53d8\u91cf\uff0c\u4ee5\u4fbf\u5728\u7a0b\u5e8f\u7684\u4e0d\u540c\u90e8\u5206\u4e4b\u95f4\u5171\u4eab\u53d8\u91cf\u7684\u503c\u3002\u4f7f\u7528STM32\u5168\u5c40\u53d8\u91cf\u5b9a\u4e49\u9700\u8981\u5b9a\u4e49\u53d8\u91cf\u3001\u4f7f\u7528\u53d8\u91cf\u548c\u66f4\u65b0\u53d8\u91cf\u4e09\u4e2a\u6b65\u9aa4\uff0c\u4ee5\u5b9e\u73b0\u66f4\u597d\u7684\u7a0b\u5e8f\u7ba1\u7406\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

        STM32\u5168\u5c40\u53d8\u91cf\u5b9a\u4e49\u662f\u4e00\u79cd\u4f7f\u7528STM32\u5fae\u63a7\u5236\u5668\u7684\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u7ba1\u7406\u5185\u5b58\u548c\u63d0\u9ad8\u7a0b\u5e8f\u7684\u53ef\u7ef4\u62a4\u6027\u3002\u672c\u6587\u5c06\u4ecb\u7ecdSTM32\u5168\u5c40\u53d8\u91cf<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[287],"class_list":["post-43317","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-stm32"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/43317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=43317"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/43317\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=43317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=43317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=43317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}