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.
pca9685_reg.h
00001 #ifndef __PCA9685_H 00002 #define __PCA9685_H 00003 00004 /* Devices */ 00005 #define LEDDRV1 0xb8 00006 #define LEDDRV2 0xba 00007 #define LEDDRV3 0xd8 00008 #define LEDDRV4 0xda 00009 #define LEDDRV5 0xc8 00010 #define LEDDRV6 0xca 00011 00012 /* Registers */ 00013 #define PCA9685_MODE1 0x00 00014 #define PCA9685_MODE2 0x01 00015 #define PCA9685_SUBADR1 0x02 00016 #define PCA9685_SUBADR2 0x03 00017 #define PCA9685_SUBADR3 0x04 00018 #define PCA9685_ALLCALLADR 0x05 00019 #define PCA9685_LED0_ON_L 0x06 00020 #define PCA9685_LED0_ON_H 0x07 00021 #define PCA9685_LED0_OFF_L 0x08 00022 #define PCA9685_LED0_OFF_H 0x09 00023 #define PCA9685_LED1_ON_L 0x0a 00024 #define PCA9685_LED1_ON_H 0x0b 00025 #define PCA9685_LED1_OFF_L 0x0c 00026 #define PCA9685_LED1_OFF_H 0x0d 00027 #define PCA9685_LED2_ON_L 0x0e 00028 #define PCA9685_LED2_ON_H 0x0f 00029 #define PCA9685_LED2_OFF_L 0x10 00030 #define PCA9685_LED2_OFF_H 0x11 00031 #define PCA9685_LED3_ON_L 0x12 00032 #define PCA9685_LED3_ON_H 0x13 00033 #define PCA9685_LED3_OFF_L 0x14 00034 #define PCA9685_LED3_OFF_H 0x15 00035 #define PCA9685_LED4_ON_L 0x16 00036 #define PCA9685_LED4_ON_H 0x17 00037 #define PCA9685_LED4_OFF_L 0x18 00038 #define PCA9685_LED4_OFF_H 0x19 00039 #define PCA9685_LED5_ON_L 0x1a 00040 #define PCA9685_LED5_ON_H 0x1b 00041 #define PCA9685_LED5_OFF_L 0x1c 00042 #define PCA9685_LED5_OFF_H 0x1d 00043 #define PCA9685_LED6_ON_L 0x1e 00044 #define PCA9685_LED6_ON_H 0x1d 00045 #define PCA9685_LED6_OFF_L 0x20 00046 #define PCA9685_LED6_OFF_H 0x21 00047 #define PCA9685_LED7_ON_L 0x22 00048 #define PCA9685_LED7_ON_H 0x23 00049 #define PCA9685_LED7_OFF_L 0x24 00050 #define PCA9685_LED7_OFF_H 0x25 00051 #define PCA9685_LED8_ON_L 0x26 00052 #define PCA9685_LED8_ON_H 0x27 00053 #define PCA9685_LED8_OFF_L 0x28 00054 #define PCA9685_LED8_OFF_H 0x29 00055 #define PCA9685_LED9_ON_L 0x2a 00056 #define PCA9685_LED9_ON_H 0x2b 00057 #define PCA9685_LED9_OFF_L 0x2c 00058 #define PCA9685_LED9_OFF_H 0x2d 00059 #define PCA9685_LED10_ON_L 0x2e 00060 #define PCA9685_LED10_ON_H 0x2f 00061 #define PCA9685_LED10_OFF_L 0x30 00062 #define PCA9685_LED10_OFF_H 0x31 00063 #define PCA9685_LED11_ON_L 0x32 00064 #define PCA9685_LED11_ON_H 0x33 00065 #define PCA9685_LED11_OFF_L 0x34 00066 #define PCA9685_LED11_OFF_H 0x35 00067 #define PCA9685_LED12_ON_L 0x36 00068 #define PCA9685_LED12_ON_H 0x37 00069 #define PCA9685_LED12_OFF_L 0x38 00070 #define PCA9685_LED12_OFF_H 0x39 00071 #define PCA9685_LED13_ON_L 0x3a 00072 #define PCA9685_LED13_ON_H 0x3b 00073 #define PCA9685_LED13_OFF_L 0x3c 00074 #define PCA9685_LED13_OFF_H 0x3d 00075 #define PCA9685_LED14_ON_L 0x3e 00076 #define PCA9685_LED14_ON_H 0x3f 00077 #define PCA9685_LED14_OFF_L 0x40 00078 #define PCA9685_LED14_OFF_H 0x41 00079 #define PCA9685_LED15_ON_L 0x42 00080 #define PCA9685_LED15_ON_H 0x43 00081 #define PCA9685_LED15_OFF_L 0x44 00082 #define PCA9685_LED15_OFF_H 0x45 00083 #define PCA9685_ALL_LED_ON_L 0xfa 00084 #define PCA9685_ALL_LED_ON_H 0xfb 00085 #define PCA9685_ALL_LED_OFF_L 0xfc 00086 #define PCA9685_ALL_LED_OFF_H 0xfd 00087 #define PCA9685_PRE_SCALE 0xfe 00088 00089 /* MODE1 bits */ 00090 #define PCA9685_RESTART 0x80 00091 #define PCA9685_EXTCLK 0x40 00092 #define PCA9685_AI 0x20 00093 #define PCA9685_SLEEP 0x10 00094 #define PCA9685_SUB1 0x08 00095 #define PCA9685_SUB2 0x04 00096 #define PCA9685_SUB3 0x02 00097 #define PCA9685_ALLCALL 0x01 00098 00099 /* MODE2 bits */ 00100 #define PCA9685_INVRT 0x10 00101 #define PCA9685_OCH 0x08 00102 #define PCA9685_OUTDRV 0x04 00103 #define PCA9685_OUTNE1 0x02 00104 #define PCA9685_OUTNE0 0x01 00105 00106 /* LEDX_ON_H bits */ 00107 #define PCA9685_LED_ON 0x10 00108 00109 /* LEDX_OFF_H bits */ 00110 #define PCA9685_LED_OFF 0x10 00111 00112 #define PCA9685_LED_BUFSIZ 0x04 00113 #define PCA9685_BASE(led) ((led * 4) + 6) 00114 #define PCA9685_LED_ON_L 0x00 00115 #define PCA9685_LED_ON_H 0x01 00116 #define PCA9685_LED_OFF_L 0x02 00117 #define PCA9685_LED_OFF_H 0x03 00118 #define PCA9685_ALL_LEDS -1 00119 00120 #endif
Generated on Mon Jul 18 2022 01:14:06 by
1.7.2