demo sample to drive PCU9955 and PCA9629
Dependencies: mbed I2C_slaves PCU9669 parallel_bus
Fork of mini_board_PCU9669 by
PCx9955_reg.h
00001 /* A sample code for PCU9669 (and its family) operation sample 00002 * 00003 * @author Tedd OKANO, NXP Semiconductors 00004 * @version 0.5 00005 * @date 13-Oct-2011 00006 * 00007 * Released under the MIT License: http://mbed.org/license/mit 00008 * 00009 * An operation sample of PCU9669 I2C bus controller. 00010 * The mbed accesses the PCU9669's parallel port (8 bit address and 8 bit data) using bit-banging. 00011 * The bit-banging is poerformed by PortInOut function of mbed library. 00012 * 00013 * To make the code porting easier, all codes are partitioned into layers to abstract other parts. 00014 * The mbed specific parts are concentrated in lowest layer: "hardware_abs.*". 00015 * This module may need to be modified when porting. 00016 * 00017 * All other upper layers are writen in standard-C. 00018 * 00019 * base code is written from 05-Sep-2011 to 09-Sep-2011. 00020 * And demo code has been build on 11-Sep-2011. 00021 * Debug and code adjustment has been done on 08-Sep-2011. 00022 * Small sanitization for main.cpp. All mbed related codes are moved in to "hardware_abs.*". 13-Oct-2011 00023 */ 00024 00025 /** PCx9955 (PCU9955 and PCA9955) related definitions 00026 * 00027 * PCx9955's internal register name and address definitions, I2C address difinitions 00028 */ 00029 00030 #ifndef __PCx9955_REG__ 00031 #define __PCx9955_REG__ 00032 00033 /** @var Register names 00034 * 00035 * PCx9955 internal register name and addesses 00036 */ 00037 typedef enum { 00038 MODE1 = 0x00, 00039 MODE2, 00040 LEDOUT0, 00041 LEDOUT1, 00042 LEDOUT2, 00043 LEDOUT3, 00044 GRPPWM = 0x08, 00045 GRPFREQ, 00046 PWM0 = 0x0A, 00047 PWM1, 00048 PWM2, 00049 PWM3, 00050 PWM4, 00051 PWM5, 00052 PWM6, 00053 PWM7, 00054 PWM8, 00055 PWM9, 00056 PWM10, 00057 PWM11, 00058 PWM12, 00059 PWM13, 00060 PWM14, 00061 PWM15, 00062 IREF0 = 0x22, 00063 IREF1, 00064 IREF2, 00065 IREF3, 00066 IREF4, 00067 IREF5, 00068 IREF6, 00069 IREF7, 00070 IREF8, 00071 IREF9, 00072 IREF10, 00073 IREF11, 00074 IREF12, 00075 IREF13, 00076 IREF14, 00077 IREF15, 00078 OFFSET = 0x3A, 00079 SUBADR1, 00080 SUBADR2, 00081 SUBADR3, 00082 ALLCALLADR, 00083 RESERVED1, 00084 RESERVED2, 00085 RESERVED3, 00086 PWMALL, 00087 IREFALL, 00088 EFLAG0, 00089 EFLAG1, 00090 00091 REGISTER_START = MODE1, 00092 LEDOUT_REGISTER_START = LEDOUT0, 00093 PWM_REGISTER_START = PWM0, 00094 IREF_REGISTER_START = IREF0, 00095 } 00096 command_reg; 00097 00098 /** @var PCx9955 I2C bus addresses 00099 */ 00100 typedef enum { 00101 PCx9955_ADDR0 = 0xC0, 00102 PCx9955_ADDR1 = 0xC2, 00103 PCx9955_ADDR2 = 0xC4, 00104 PCx9955_ADDR3 = 0xC6, 00105 PCx9955_ADDR4 = 0xC8, 00106 PCx9955_ADDR5 = 0xCA, 00107 PCx9955_ADDR6 = 0xCC, 00108 PCx9955_ADDR7 = 0xCE, 00109 PCx9955_ADDR8 = 0xD0, 00110 PCx9955_ADDR9 = 0xD2, 00111 PCx9955_ADDRA = 0xD4, 00112 PCx9955_ADDRB = 0xD6, 00113 PCx9955_ADDRC = 0xD0, 00114 PCx9955_ADDRD = 0xD2, 00115 PCx9955_ADDRE = 0xD4, 00116 PCx9955_ADDRF = 0xD6 00117 } 00118 pcx9955_addr; 00119 00120 00121 00122 #endif // __PCx9955_REG__
Generated on Fri Jul 22 2022 13:11:42 by 1.7.2