Site Tools


Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum". upgrade now! [54.2] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
Hotfix release available: 2018-04-22a "Greebo". upgrade now! [50.1] (what's this?)
New release available: 2018-04-22 "Greebo". upgrade now! [50] (what's this?)
Hotfix release available: 2017-02-19g "Frusterick Manners". upgrade now! [49.7] (what's this?)
Hotfix release available: 2017-02-19f "Frusterick Manners". upgrade now! [49.6] (what's this?)
Hotfix release available: 2017-02-19e "Frusterick Manners". upgrade now! [49.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2017-02-19d "Frusterick Manners". upgrade now! [49.4] (what's this?)
Hotfix release available fixing CVE-2017-12583: 2017-02-19c "Frusterick Manners". upgrade now! [49.3] (what's this?)
buzzer_api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
buzzer_api [2017/09/25 22:27]
1.241.172.144
buzzer_api [2017/09/25 22:31] (current)
1.241.172.144
Line 1: Line 1:
  
-Header File+API Application Example 
 + 
 +  #​include "​Buzzer.h"​ 
 +  ... 
 +  ... 
 +  int main() 
 +  { 
 +  uint32_t Octave;​ 
 +  ... 
 +  ... 
 +  if ( buzzer_open() < 0 ) 
 +  { 
 +  printf("​Fail to buzzer_open\n"​);​ 
 +  } 
 +  ... 
 +  ... 
 +  Octave = 4;/* 4 옥타브의 소리*/ 
 +  ... 
 +  ... 
 +  case KEY_1:​ 
 +  printf("​Key code : KEY_1 (0x%X)\n",​ KeyCode); 
 +  if ( IsReleased == 1 ) 
 +  { /* Key Released */ 
 +  ... 
 +  ... 
 +  buzzer_off();​ 
 +  ... 
 +  ... 
 +  } 
 +  else 
 +  { 
 +  ... 
 +  ... 
 +  buzzer_on_code( MUSIC_FREQUENCY_CODE_C,​ Octave );/*C는 도이다*/​ 
 +  ... 
 +  ... 
 +  } 
 +  break; 
 +  ... 
 +  ... 
 +  if ( buzzer_close() < 0 ) 
 +  { 
 +  printf("​Fail to buzzer_close\n"​);​ 
 +  } 
 +  ... 
 +  ... 
 +  } 
 + 
 +카가 눌리는 동안 소리가 난다. 
 + 
 + 
 +API Header File
  
   #​ifndef __BUZZER_H__   #​ifndef __BUZZER_H__
Line 89: Line 140:
   #endif /* __BUZZER_H__ */   #endif /* __BUZZER_H__ */
  
-Source File+API Source File
  
   #​include <​stdio.h>​   #​include <​stdio.h>​
Line 450: Line 501:
   return device_buzzer_off( DEVICE_BUZZER );   return device_buzzer_off( DEVICE_BUZZER );
   }   }
- 
-Application Example 
- 
-  #​include "​Buzzer.h"​ 
-  ... 
-  ... 
-  int main() 
-  { 
-  uint32_t Octave;​ 
-  ... 
-  ... 
-  if ( buzzer_open() < 0 ) 
-  { 
-  printf("​Fail to buzzer_open\n"​);​ 
-  } 
-  ... 
-  ... 
-  case KEY_1:​ 
-  printf("​Key code : KEY_1 (0x%X)\n",​ KeyCode); 
-  if ( IsReleased == 1 ) 
-  { /* Key Released */ 
-  ... 
-  ... 
-  buzzer_off();​ 
-  ... 
-  ... 
-  } 
-  else 
-  { 
-  ... 
-  ... 
-  buzzer_on_code( MUSIC_FREQUENCY_CODE_C,​ Octave ); 
-  ... 
-  ... 
-  } 
-  break; 
-  ... 
-  ... 
-  if ( buzzer_close() < 0 ) 
-  { 
-  printf("​Fail to buzzer_close\n"​);​ 
-  } 
-  ... 
-  ... 
-  } 
- 
-카가 눌리는 동안 소리가 난다. 
- 
- 
- 
  
  
buzzer_api.1506346079.txt.gz · Last modified: 2017/09/25 22:27 by 1.241.172.144