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.
config.h
00001 #define TARGET_STM32F4XX 00002 #define NUM_OF_BUTTONS 32 00003 #define SYSTEM_CLOCK_HZ 96000000 // 96MHz 00004 00005 // Joystick button input pin assignments. 00006 // 00007 // You can wire up to 32 GPIO ports to buttons (equipped with 00008 // momentary switches). Connect each switch between the desired 00009 // GPIO port and ground (J9 pin 12 or 14). When the button is pressed, 00010 // we'll tell the host PC that the corresponding joystick button is 00011 // pressed. We debounce the keystrokes in software, so you can simply 00012 // wire directly to pushbuttons with no additional external hardware. 00013 // 00014 // Note that we assign 24 buttons by default, even though the USB 00015 // joystick interface can handle up to 32 buttons. VP itself only 00016 // allows mapping of up to 24 buttons in the preferences dialog 00017 // (although it can recognize 32 buttons internally). If you want 00018 // more buttons, you can reassign pins that are assigned by default 00019 // as LedWiz outputs. To reassign a pin, find the pin you wish to 00020 // reassign in the LedWizPortMap array below, and change the pin name 00021 // there to NC (for Not Connected). You can then change one of the 00022 // "NC" entries below to the reallocated pin name. The limit is 32 00023 // buttons total. 00024 // 00025 // (If you're using TLC5940 chips to control outputs, many of the 00026 // GPIO pins that are mapped to LedWiz outputs in the default 00027 // mapping can be reassigned as keys, since the TLC5940 outputs 00028 // take over for the GPIO pins. The exceptions are the pins that 00029 // are reassigned to control the TLC5940 chips.) 00030 // 00031 // Note: PTD1 (pin J2-12) should NOT be assigned as a button input, 00032 // as this pin is physically connected on the KL25Z to the on-board 00033 // indicator LED's blue segment. 00034 00035 PinName buttonMap[] = { 00036 PA_3, // button 1 00037 PA_2, // button 2 00038 PA_10, // button 3 00039 PB_3, // button 4 00040 PB_5, // button 5 00041 PB_4, // button 6 00042 PB_10, // button 7 00043 PA_8, // button 8 00044 PA_9, // button 9 00045 PC_7, // button 10 00046 PB_6, // button 11 00047 PA_7, // button 12 00048 PA_6, // button 13 00049 PA_5, // button 14 00050 PB_9, // button 15 00051 PB_8, // button 16 00052 PC_9, // button 17 00053 PB_4, // button 18 00054 PB_13, // button 19 00055 PB_14, // button 20 00056 PB_15, // button 21 00057 PB_1, // button 22 00058 PB_2, // button 23 00059 PC_5, // button 24 00060 PC_6, // button 25 00061 PC_8, // button 26 00062 PH_1, // button 27 00063 PH_0, // button 28 00064 PC_15, // button 29 00065 PC_14, // button 30 00066 PC_13, // button 31 00067 PB_7 // button 32 00068 }; 00069 00070 // STANDARD ID SETTINGS. These provide full, transparent LedWiz compatibility. 00071 const uint16_t USB_VENDOR_ID = 0x1209; 00072 const uint16_t USB_PRODUCT_ID = 0xACDE; 00073 const uint16_t USB_PRODUCT_VER = 0x0001;
Generated on Fri Jul 15 2022 06:19:56 by
1.7.2