Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main_mouse.cpp
- Committer:
- va009039
- Date:
- 2015-06-20
- Revision:
- 1:eea17a20509b
- Parent:
- 0:3395699bd0df
- Child:
- 2:c0c2a61188a9
File content as of revision 1:eea17a20509b:
#if 0
// https://developer.mbed.org/handbook/USBMouse
#include "mbed.h"
#include "USBMouse.h"
#include "STM32_USB48MHz.h"
int main() {
STM32_HSI_USB48MHz(); // HSI,USB48MHz,SYSCLK32MHz
USBMouse mouse;
int16_t x = 0;
int16_t y = 0;
int32_t radius = 10;
int32_t angle = 0;
while (1) {
x = cos((double)angle*3.14/180.0)*radius;
y = sin((double)angle*3.14/180.0)*radius;
mouse.move(x, y);
angle += 3;
wait(0.005);
}
}
#endif