Psi Swarm robot library version 0.9
Fork of PsiSwarmV8_CPP by
sound.h@11:312663037b8c, 2016-10-16 (annotated)
- Committer:
- jah128
- Date:
- Sun Oct 16 21:06:15 2016 +0000
- Revision:
- 11:312663037b8c
- Parent:
- pic.h@6:b340a527add9
Added more classes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jah128 | 11:312663037b8c | 1 | /* University of York Robotics Laboratory PsiSwarm Library: Audio Driver using PIC coprocessor Source File |
jah128 | 0:d6269d17c8cf | 2 | * |
jah128 | 6:b340a527add9 | 3 | * Copyright 2016 University of York |
jah128 | 6:b340a527add9 | 4 | * |
jah128 | 6:b340a527add9 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. |
jah128 | 6:b340a527add9 | 6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 |
jah128 | 6:b340a527add9 | 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS |
jah128 | 6:b340a527add9 | 8 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
jah128 | 6:b340a527add9 | 9 | * See the License for the specific language governing permissions and limitations under the License. |
jah128 | 6:b340a527add9 | 10 | * |
jah128 | 0:d6269d17c8cf | 11 | * File: pic.h |
jah128 | 0:d6269d17c8cf | 12 | * |
jah128 | 0:d6269d17c8cf | 13 | * (C) Dept. Electronics & Computer Science, University of York |
jah128 | 0:d6269d17c8cf | 14 | * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis |
jah128 | 0:d6269d17c8cf | 15 | * |
jah128 | 11:312663037b8c | 16 | * PsiSwarm Library Version: 0.8 |
jah128 | 0:d6269d17c8cf | 17 | * |
jah128 | 5:3cdd1a37cdd7 | 18 | * October 2016 |
jah128 | 0:d6269d17c8cf | 19 | * |
jah128 | 0:d6269d17c8cf | 20 | * |
jah128 | 0:d6269d17c8cf | 21 | */ |
jah128 | 0:d6269d17c8cf | 22 | |
jah128 | 0:d6269d17c8cf | 23 | |
jah128 | 11:312663037b8c | 24 | #ifndef SOUND_H |
jah128 | 11:312663037b8c | 25 | #define SOUND_H |
jah128 | 0:d6269d17c8cf | 26 | |
jah128 | 11:312663037b8c | 27 | /** |
jah128 | 11:312663037b8c | 28 | * Sound class |
jah128 | 11:312663037b8c | 29 | * Functions that generate audio tones using the sound module on the PIC coprocessor, where used |
jah128 | 11:312663037b8c | 30 | * |
jah128 | 11:312663037b8c | 31 | */ |
jah128 | 11:312663037b8c | 32 | class Sound |
jah128 | 11:312663037b8c | 33 | { |
jah128 | 11:312663037b8c | 34 | public: |
jah128 | 11:312663037b8c | 35 | |
jah128 | 11:312663037b8c | 36 | /** Play a tune defined by the given null terminated string |
jah128 | 11:312663037b8c | 37 | * @param tune - The tune to play |
jah128 | 11:312663037b8c | 38 | */ |
jah128 | 0:d6269d17c8cf | 39 | void play_audio_string(char * tune); |
jah128 | 11:312663037b8c | 40 | |
jah128 | 11:312663037b8c | 41 | /** Play a tune defined by the given string |
jah128 | 11:312663037b8c | 42 | * @param tune - The tune to play |
jah128 | 11:312663037b8c | 43 | * @param length - The number of characters in the string |
jah128 | 11:312663037b8c | 44 | */ |
jah128 | 0:d6269d17c8cf | 45 | void play_tune(char * tune, char length); |
jah128 | 0:d6269d17c8cf | 46 | char IF_check_pic_firmware(void); |
jah128 | 11:312663037b8c | 47 | }; |
jah128 | 0:d6269d17c8cf | 48 | #endif |