PCA9629 a stepper motor controller class library

Dependents:   PCA9629_Hello

Class library for PCA9629.

A sample program available on http://mbed.org/users/nxp_ip/code/PCA9629_Hello/

Committer:
nxp_ip
Date:
Fri Feb 03 04:03:34 2012 +0000
Revision:
4:9a80b6d63005
Child:
5:aff87a1c8bd6

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nxp_ip 4:9a80b6d63005 1 /** A sample code for PCA9629
nxp_ip 4:9a80b6d63005 2 *
nxp_ip 4:9a80b6d63005 3 * @author Tedd OKANO, NXP Semiconductors
nxp_ip 4:9a80b6d63005 4 * @version 1.0
nxp_ip 4:9a80b6d63005 5 * @date 03-Feb-2011
nxp_ip 4:9a80b6d63005 6 *
nxp_ip 4:9a80b6d63005 7 * Released under the MIT License: http://mbed.org/license/mit
nxp_ip 4:9a80b6d63005 8 *
nxp_ip 4:9a80b6d63005 9 * An operation sample of PCU9629 stepper motor controller.
nxp_ip 4:9a80b6d63005 10 * The mbed accesses the PCU9629 registers through I2C.
nxp_ip 4:9a80b6d63005 11 */
nxp_ip 4:9a80b6d63005 12
nxp_ip 4:9a80b6d63005 13 #ifndef MBED_PCA9629
nxp_ip 4:9a80b6d63005 14 #define MBED_PCA9629
nxp_ip 4:9a80b6d63005 15
nxp_ip 4:9a80b6d63005 16 #define INTELIGENT_WRITE
nxp_ip 4:9a80b6d63005 17
nxp_ip 4:9a80b6d63005 18 #define PCA9629_DEFAULT_ADDR 0x42
nxp_ip 4:9a80b6d63005 19
nxp_ip 4:9a80b6d63005 20 #define INIT_VALUE__MODE 0x10;
nxp_ip 4:9a80b6d63005 21 #define INIT_VALUE__SUBADR1 0xE2;
nxp_ip 4:9a80b6d63005 22 #define INIT_VALUE__SUBADR2 0xE4;
nxp_ip 4:9a80b6d63005 23 #define INIT_VALUE__SUBADR3 0xE8;
nxp_ip 4:9a80b6d63005 24 #define INIT_VALUE__ALLCALLADR 0xE0;
nxp_ip 4:9a80b6d63005 25 #define INIT_VALUE__WDTOI 0xFF;
nxp_ip 4:9a80b6d63005 26 #define INIT_VALUE__WDTCNTL 0x00;
nxp_ip 4:9a80b6d63005 27 #define INIT_VALUE__IP 0x00;
nxp_ip 4:9a80b6d63005 28 #define INIT_VALUE__INTSTAT 0x00;
nxp_ip 4:9a80b6d63005 29 #define INIT_VALUE__OP 0x0F;
nxp_ip 4:9a80b6d63005 30 #define INIT_VALUE__IOC 0x03;
nxp_ip 4:9a80b6d63005 31 #define INIT_VALUE__MSK 0x0F;
nxp_ip 4:9a80b6d63005 32 #define INIT_VALUE__CLRINT 0x0C;
nxp_ip 4:9a80b6d63005 33 #define INIT_VALUE__INTMODE 0x00;
nxp_ip 4:9a80b6d63005 34 #define INIT_VALUE__INT_ACT_SETUP 0x00;
nxp_ip 4:9a80b6d63005 35 #define INIT_VALUE__INT_MTR_SETUP 0x00;
nxp_ip 4:9a80b6d63005 36 #define INIT_VALUE__INT_ES_SETUP 0x00;
nxp_ip 4:9a80b6d63005 37 #define INIT_VALUE__INT_AUTO_CLR 0x00;
nxp_ip 4:9a80b6d63005 38 #define INIT_VALUE__SETMODE 0x00;
nxp_ip 4:9a80b6d63005 39 #define INIT_VALUE__PHCNTL 0x00;
nxp_ip 4:9a80b6d63005 40 #define INIT_VALUE__SROTNL 0x30;
nxp_ip 4:9a80b6d63005 41 #define INIT_VALUE__SROTNH 0x00;
nxp_ip 4:9a80b6d63005 42 #define INIT_VALUE__CWPWL 0x00;
nxp_ip 4:9a80b6d63005 43 #define INIT_VALUE__CWPWH 0x00;
nxp_ip 4:9a80b6d63005 44 #define INIT_VALUE__CCWPWL 0x00;
nxp_ip 4:9a80b6d63005 45 #define INIT_VALUE__CCWPWH 0x00;
nxp_ip 4:9a80b6d63005 46 #define INIT_VALUE__CWSCOUNTL 0x00;
nxp_ip 4:9a80b6d63005 47 #define INIT_VALUE__CWSCOUNTH 0x00;
nxp_ip 4:9a80b6d63005 48 #define INIT_VALUE__CCWSCOUNTL 0x00;
nxp_ip 4:9a80b6d63005 49 #define INIT_VALUE__CCWSCOUNTH 0x00;
nxp_ip 4:9a80b6d63005 50 #define INIT_VALUE__CWRCOUNTL 0x00;
nxp_ip 4:9a80b6d63005 51 #define INIT_VALUE__CWRCOUNTH 0x00;
nxp_ip 4:9a80b6d63005 52 #define INIT_VALUE__CCWRCOUNTL 0x00;
nxp_ip 4:9a80b6d63005 53 #define INIT_VALUE__CCWRCOUNTH 0x00;
nxp_ip 4:9a80b6d63005 54 #define INIT_VALUE__EXTRASTEPS0 0x00;
nxp_ip 4:9a80b6d63005 55 #define INIT_VALUE__EXTRASTEPS1 0x00;
nxp_ip 4:9a80b6d63005 56 #define INIT_VALUE__RAMPCNTL 0x00;
nxp_ip 4:9a80b6d63005 57 #define INIT_VALUE__LOOPDLY 0x00;
nxp_ip 4:9a80b6d63005 58 #define INIT_VALUE__MCNTL 0x00;
nxp_ip 4:9a80b6d63005 59
nxp_ip 4:9a80b6d63005 60
nxp_ip 4:9a80b6d63005 61 /** PCA9629 class
nxp_ip 4:9a80b6d63005 62 *
nxp_ip 4:9a80b6d63005 63 */
nxp_ip 4:9a80b6d63005 64
nxp_ip 4:9a80b6d63005 65 class PCA9629 {
nxp_ip 4:9a80b6d63005 66 public:
nxp_ip 4:9a80b6d63005 67
nxp_ip 4:9a80b6d63005 68 /** name of registers */
nxp_ip 4:9a80b6d63005 69 typedef enum {
nxp_ip 4:9a80b6d63005 70 MODE, /**< Mode rgister */
nxp_ip 4:9a80b6d63005 71 SUBADR1, /**< I2C-bus subaddress 1 */
nxp_ip 4:9a80b6d63005 72 SUBADR2, /**< I2C-bus subaddress 2 */
nxp_ip 4:9a80b6d63005 73 SUBADR3, /**< I2C-bus subaddress 3 */
nxp_ip 4:9a80b6d63005 74 ALLCALLADR, /**< All call I2C-bus address */
nxp_ip 4:9a80b6d63005 75 WDTOI, /**< Watchdog time-out interval register */
nxp_ip 4:9a80b6d63005 76 WDTCNTL, /**< Watchdog control register */
nxp_ip 4:9a80b6d63005 77 IP, /**< Input port register */
nxp_ip 4:9a80b6d63005 78 INTSTAT, /**< Interrupt status register */
nxp_ip 4:9a80b6d63005 79 OP, /**< Output port register */
nxp_ip 4:9a80b6d63005 80 IOC, /**< I/O configuration register */
nxp_ip 4:9a80b6d63005 81 MSK, /**< Mask interrupt register */
nxp_ip 4:9a80b6d63005 82 CLRINT, /**< Clear Interrupts */
nxp_ip 4:9a80b6d63005 83 INTMODE, /**< Interrupt mode register */
nxp_ip 4:9a80b6d63005 84 INT_ACT_SETUP, /**< Interrupt action setup control register */
nxp_ip 4:9a80b6d63005 85 INT_MTR_SETUP, /**< Interrupt motor setup control register */
nxp_ip 4:9a80b6d63005 86 INT_ES_SETUP, /**< Interrupt extra steps setup control register */
nxp_ip 4:9a80b6d63005 87 INT_AUTO_CLR, /**< Interrupt auto clear control register */
nxp_ip 4:9a80b6d63005 88 SETMODE, /**< Output state on STOP */
nxp_ip 4:9a80b6d63005 89 PHCNTL, /**< Phase control register */
nxp_ip 4:9a80b6d63005 90 SROTNL, /**< Steps per rotation low byte */
nxp_ip 4:9a80b6d63005 91 SROTNH, /**< Steps per rotation high byte */
nxp_ip 4:9a80b6d63005 92 CWPWL, /**< Step pulse width for CW rotation low byte */
nxp_ip 4:9a80b6d63005 93 CWPWH, /**< Step pulse width for CW rotation high byte */
nxp_ip 4:9a80b6d63005 94 CCWPWL, /**< Step pulse width for CCW rotation low byte */
nxp_ip 4:9a80b6d63005 95 CCWPWH, /**< Step pulse width for CCW rotation high byte */
nxp_ip 4:9a80b6d63005 96 CWSCOUNTL, /**< Number of steps CW low byte */
nxp_ip 4:9a80b6d63005 97 CWSCOUNTH, /**< Number of steps CW high byte */
nxp_ip 4:9a80b6d63005 98 CCWSCOUNTL, /**< Number of steps CCW low byte */
nxp_ip 4:9a80b6d63005 99 CCWSCOUNTH, /**< Number of steps CCW high byte */
nxp_ip 4:9a80b6d63005 100 CWRCOUNTL, /**< Number of rotatations CW low byte */
nxp_ip 4:9a80b6d63005 101 CWRCOUNTH, /**< Number of rotatations CW high byte */
nxp_ip 4:9a80b6d63005 102 CCWRCOUNTL, /**< Number of rotatations CCW low byte */
nxp_ip 4:9a80b6d63005 103 CCWRCOUNTH, /**< Number of rotatations CCW high byte */
nxp_ip 4:9a80b6d63005 104 EXTRASTEPS0, /**< Count value for extra steps or rotations for INTP0 */
nxp_ip 4:9a80b6d63005 105 EXTRASTEPS1, /**< Count value for extra steps or rotations for INTP1 */
nxp_ip 4:9a80b6d63005 106 RAMPCNTL, /**< Ramp control register */
nxp_ip 4:9a80b6d63005 107 LOOPDLY, /**< Loopdelay time register */
nxp_ip 4:9a80b6d63005 108 MCNTL, /**< Control start/stop motor */
nxp_ip 4:9a80b6d63005 109 } RegisterName;
nxp_ip 4:9a80b6d63005 110
nxp_ip 4:9a80b6d63005 111 /** register names to make 2 bytes access */
nxp_ip 4:9a80b6d63005 112 typedef enum {
nxp_ip 4:9a80b6d63005 113 SROTN_ = SROTNL | 0x80, /**< Steps per rotation */
nxp_ip 4:9a80b6d63005 114 CWPW_ = CWPWL | 0x80, /**< Step pulse width for CW rotation */
nxp_ip 4:9a80b6d63005 115 CCWPW_ = CCWPWL | 0x80, /**< Step pulse width for CCW rotation */
nxp_ip 4:9a80b6d63005 116 CWSCOUNT_ = CWSCOUNTL | 0x80, /**< Number of steps CW */
nxp_ip 4:9a80b6d63005 117 CCWSCOUNT_ = CCWSCOUNTL | 0x80, /**< Number of steps CCW */
nxp_ip 4:9a80b6d63005 118 CWRCOUNT_ = CWRCOUNTL | 0x80, /**< Number of rotatations CW */
nxp_ip 4:9a80b6d63005 119 CCWRCOUNT_ = CCWRCOUNTL | 0x80, /**< Number of rotatations CCW */
nxp_ip 4:9a80b6d63005 120 STEPS_PER_ROATION = SROTN_,
nxp_ip 4:9a80b6d63005 121 CW__STEP_WIDTH = CWPW_,
nxp_ip 4:9a80b6d63005 122 CCW_STEP_WIDTH = CCWPW_,
nxp_ip 4:9a80b6d63005 123 CW__STEP_COUNT = CWSCOUNT_,
nxp_ip 4:9a80b6d63005 124 CCW_STEP_COUNT = CCWSCOUNT_,
nxp_ip 4:9a80b6d63005 125 CW__ROTATION_COUNT = CWRCOUNT_,
nxp_ip 4:9a80b6d63005 126 CCW_ROTATION_COUNT = CCWRCOUNT_
nxp_ip 4:9a80b6d63005 127 } Register16bits;
nxp_ip 4:9a80b6d63005 128
nxp_ip 4:9a80b6d63005 129 /** keyword to select direction of rotation */
nxp_ip 4:9a80b6d63005 130 typedef enum {
nxp_ip 4:9a80b6d63005 131 CW = 0, /**< Clockwise direction */
nxp_ip 4:9a80b6d63005 132 CCW /**< ConterClockwise direction */
nxp_ip 4:9a80b6d63005 133 } Direction;
nxp_ip 4:9a80b6d63005 134
nxp_ip 4:9a80b6d63005 135 /** plescaler range setting */
nxp_ip 4:9a80b6d63005 136 typedef enum {
nxp_ip 4:9a80b6d63005 137 PRESCALER_FROM_40_TO_333333, /**< Prescaler range from 3us(333333pps) to 24.576ms(40 pps) */
nxp_ip 4:9a80b6d63005 138 PRESCALER_FROM_20_TO_166667, /**< Prescaler range from 6us(166667pps) to 49.152ms(20 pps) */
nxp_ip 4:9a80b6d63005 139 PRESCALER_FROM_10_TO_83333, /**< Prescaler range from 12us( 83333pps) to 98.304ms(10 pps) */
nxp_ip 4:9a80b6d63005 140 PRESCALER_FROM_5_TO_41667, /**< Prescaler range from 24us( 41667pps) to 196.608ms( 5 pps) */
nxp_ip 4:9a80b6d63005 141 PRESCALER_FROM_2_5_TO_20833, /**< Prescaler range from 48us( 20833pps) to 393.216ms( 2.5 pps) */
nxp_ip 4:9a80b6d63005 142 PRESCALER_FROM_1_27_TO_10416, /**< Prescaler range from 96us( 10416pps) to 786.432ms( 1.27pps) */
nxp_ip 4:9a80b6d63005 143 PRESCALER_FROM_0_64_TO_5208, /**< Prescaler range from 192us( 5208pps) to 1572.864ms( 0.64pps) */
nxp_ip 4:9a80b6d63005 144 PRESCALER_FROM_0_32_TO_2604, /**< Prescaler range from 384us( 2604pps) to 3145.728ms( 0.32pps) */
nxp_ip 4:9a80b6d63005 145 } PrescalerRange;
nxp_ip 4:9a80b6d63005 146
nxp_ip 4:9a80b6d63005 147 /** Create a PCA9629 instance connected to specified I2C pins with specified address
nxp_ip 4:9a80b6d63005 148 *
nxp_ip 4:9a80b6d63005 149 * @param I2C_sda I2C-bus SDA pin
nxp_ip 4:9a80b6d63005 150 * @param I2C_scl I2C-bus SCL pin
nxp_ip 4:9a80b6d63005 151 * @param I2C_address I2C-bus address (default: 0x42)
nxp_ip 4:9a80b6d63005 152 */
nxp_ip 4:9a80b6d63005 153 PCA9629(
nxp_ip 4:9a80b6d63005 154 PinName I2C_sda,
nxp_ip 4:9a80b6d63005 155 PinName I2C_scl,
nxp_ip 4:9a80b6d63005 156 char I2C_address = PCA9629_DEFAULT_ADDR
nxp_ip 4:9a80b6d63005 157 );
nxp_ip 4:9a80b6d63005 158
nxp_ip 4:9a80b6d63005 159 /** Initialize all registers
nxp_ip 4:9a80b6d63005 160 *
nxp_ip 4:9a80b6d63005 161 * The initializing values are defined in the function
nxp_ip 4:9a80b6d63005 162 */
nxp_ip 4:9a80b6d63005 163 void init_registers( void );
nxp_ip 4:9a80b6d63005 164
nxp_ip 4:9a80b6d63005 165 /** Initialize all registers
nxp_ip 4:9a80b6d63005 166 *
nxp_ip 4:9a80b6d63005 167 * The initializing values are defined in the function
nxp_ip 4:9a80b6d63005 168 */
nxp_ip 4:9a80b6d63005 169 void set_all_registers( char *a, char size );
nxp_ip 4:9a80b6d63005 170
nxp_ip 4:9a80b6d63005 171 /** Write 1 byte data into a register
nxp_ip 4:9a80b6d63005 172 *
nxp_ip 4:9a80b6d63005 173 * Setting 8 bits data into a register
nxp_ip 4:9a80b6d63005 174 *
nxp_ip 4:9a80b6d63005 175 * @param register_name the register name: data writing into
nxp_ip 4:9a80b6d63005 176 * @param value 8 bits writing data
nxp_ip 4:9a80b6d63005 177 */
nxp_ip 4:9a80b6d63005 178 void write( RegisterName register_name, char value );
nxp_ip 4:9a80b6d63005 179
nxp_ip 4:9a80b6d63005 180 /** Write 2 bytes data into a register
nxp_ip 4:9a80b6d63005 181 *
nxp_ip 4:9a80b6d63005 182 * Setting 16 bits data into registers
nxp_ip 4:9a80b6d63005 183 *
nxp_ip 4:9a80b6d63005 184 * @param register_name the register name: data writing into (it can be "SROTN_", "CWPW_", "CCWPW_", "CWRCOUNT_", "CCWSCOUNT_", "CWRCOUNT_" or "CCWRCOUNT_" )
nxp_ip 4:9a80b6d63005 185 * @param value 16 bits writing data
nxp_ip 4:9a80b6d63005 186 */
nxp_ip 4:9a80b6d63005 187 void write( Register16bits register_name, short value );
nxp_ip 4:9a80b6d63005 188
nxp_ip 4:9a80b6d63005 189 /** Read 1 byte data from a register
nxp_ip 4:9a80b6d63005 190 *
nxp_ip 4:9a80b6d63005 191 * Setting data into a register
nxp_ip 4:9a80b6d63005 192 *
nxp_ip 4:9a80b6d63005 193 * @param register_name the register name: data reading from
nxp_ip 4:9a80b6d63005 194 * @return read 8 bits data from the register
nxp_ip 4:9a80b6d63005 195 */
nxp_ip 4:9a80b6d63005 196 char read( RegisterName register_name );
nxp_ip 4:9a80b6d63005 197
nxp_ip 4:9a80b6d63005 198 /** Read 2 byte data from registers
nxp_ip 4:9a80b6d63005 199 *
nxp_ip 4:9a80b6d63005 200 * Setting data into a register
nxp_ip 4:9a80b6d63005 201 *
nxp_ip 4:9a80b6d63005 202 * @param register_name the register name: data writing into (it can be "SROTN_", "CWPW_", "CCWPW_", "CWRCOUNT_", "CCWSCOUNT_", "CWRCOUNT_" or "CCWRCOUNT_" )
nxp_ip 4:9a80b6d63005 203 * @return read 16 bits data from the registers
nxp_ip 4:9a80b6d63005 204 */
nxp_ip 4:9a80b6d63005 205 short read( Register16bits register_name );
nxp_ip 4:9a80b6d63005 206
nxp_ip 4:9a80b6d63005 207 /** Motor start
nxp_ip 4:9a80b6d63005 208 *
nxp_ip 4:9a80b6d63005 209 * Start command
nxp_ip 4:9a80b6d63005 210 * This function starts motor operation with hard-stop flag and rotation+step enabled, no repeat will be performed
nxp_ip 4:9a80b6d63005 211 * If custom start is required, use "write( PCA9629::MCNTL, 0xXX )" to control each bits.
nxp_ip 4:9a80b6d63005 212 *
nxp_ip 4:9a80b6d63005 213 * @param dir rotate direction ("CW" or "CCW")
nxp_ip 4:9a80b6d63005 214 */
nxp_ip 4:9a80b6d63005 215 void start( Direction dir );
nxp_ip 4:9a80b6d63005 216
nxp_ip 4:9a80b6d63005 217 /** Motor stop
nxp_ip 4:9a80b6d63005 218 *
nxp_ip 4:9a80b6d63005 219 * Stop command
nxp_ip 4:9a80b6d63005 220 *
nxp_ip 4:9a80b6d63005 221 */
nxp_ip 4:9a80b6d63005 222 void stop( void );
nxp_ip 4:9a80b6d63005 223
nxp_ip 4:9a80b6d63005 224 /** Set PPS
nxp_ip 4:9a80b6d63005 225 *
nxp_ip 4:9a80b6d63005 226 * Setting PulsePerSecond
nxp_ip 4:9a80b6d63005 227 * This interface can be used to set CWPWx or CCWPWx registers
nxp_ip 4:9a80b6d63005 228 *
nxp_ip 4:9a80b6d63005 229 * @param dir rotate direction ("CW" or "CCW")
nxp_ip 4:9a80b6d63005 230 * @param prescaler prescaler setting (for 3 bits setting range from 0 to 0x7. See datasheet)
nxp_ip 4:9a80b6d63005 231 * @param pps pps defineds pulse width for the motor. The pulse width will be 1/pps
nxp_ip 4:9a80b6d63005 232 * @return 16 bit data that what set to the CWPWx or CCWPWx registers
nxp_ip 4:9a80b6d63005 233 */
nxp_ip 4:9a80b6d63005 234 short pps( Direction dir, PrescalerRange prescaler, int pps );
nxp_ip 4:9a80b6d63005 235
nxp_ip 4:9a80b6d63005 236 /** Set PPS
nxp_ip 4:9a80b6d63005 237 *
nxp_ip 4:9a80b6d63005 238 * Setting PulsePerSecond
nxp_ip 4:9a80b6d63005 239 * This interface can be used to set CWPWx or CCWPWx registers
nxp_ip 4:9a80b6d63005 240 *
nxp_ip 4:9a80b6d63005 241 * @param dir rotate direction ("CW" or "CCW")
nxp_ip 4:9a80b6d63005 242 * @param prescaler prescaler setting (for 3 bits setting range from 0 to 0x7. See datasheet)
nxp_ip 4:9a80b6d63005 243 * @param pps pps defineds pulse width for the motor. The pulse width will be 1/pps
nxp_ip 4:9a80b6d63005 244 * @return 16 bit data that what set to the CWPWx or CCWPWx registers
nxp_ip 4:9a80b6d63005 245 */
nxp_ip 4:9a80b6d63005 246
nxp_ip 4:9a80b6d63005 247 /** Set rotation count
nxp_ip 4:9a80b6d63005 248 *
nxp_ip 4:9a80b6d63005 249 * Setting rotation count
nxp_ip 4:9a80b6d63005 250 * This interfaces CWRCOUNTx, CCWRCOUNTx registers
nxp_ip 4:9a80b6d63005 251 *
nxp_ip 4:9a80b6d63005 252 * @param dir rotate direction ("CW" or "CCW")
nxp_ip 4:9a80b6d63005 253 * @param rotations sets number of rotations with 16 bit value
nxp_ip 4:9a80b6d63005 254 */
nxp_ip 4:9a80b6d63005 255 void rotations( Direction dir, int rotations );
nxp_ip 4:9a80b6d63005 256
nxp_ip 4:9a80b6d63005 257 /** Set PPS
nxp_ip 4:9a80b6d63005 258 *
nxp_ip 4:9a80b6d63005 259 * Setting step count
nxp_ip 4:9a80b6d63005 260 * This interfaces CWSCOUNTx, CCWSCOUNTx registers
nxp_ip 4:9a80b6d63005 261 *
nxp_ip 4:9a80b6d63005 262 * @param dir rotate direction ("CW" or "CCW")
nxp_ip 4:9a80b6d63005 263 * @param steps sets number of steps with 16 bit value
nxp_ip 4:9a80b6d63005 264 */
nxp_ip 4:9a80b6d63005 265 void steps( Direction dir, int pps );
nxp_ip 4:9a80b6d63005 266
nxp_ip 4:9a80b6d63005 267
nxp_ip 4:9a80b6d63005 268 /** Register dump
nxp_ip 4:9a80b6d63005 269 *
nxp_ip 4:9a80b6d63005 270 * Dumping all register data to serial console
nxp_ip 4:9a80b6d63005 271 *
nxp_ip 4:9a80b6d63005 272 */
nxp_ip 4:9a80b6d63005 273 void register_dump( void );
nxp_ip 4:9a80b6d63005 274
nxp_ip 4:9a80b6d63005 275 /** Register dump
nxp_ip 4:9a80b6d63005 276 *
nxp_ip 4:9a80b6d63005 277 * Dumping all register data to serial console
nxp_ip 4:9a80b6d63005 278 *
nxp_ip 4:9a80b6d63005 279 */
nxp_ip 4:9a80b6d63005 280 void speed_change( unsigned short pw );
nxp_ip 4:9a80b6d63005 281
nxp_ip 4:9a80b6d63005 282 private:
nxp_ip 4:9a80b6d63005 283 I2C i2c;
nxp_ip 4:9a80b6d63005 284 char i2c_addr;
nxp_ip 4:9a80b6d63005 285 };
nxp_ip 4:9a80b6d63005 286
nxp_ip 4:9a80b6d63005 287 #endif // MBED_PCA9629
nxp_ip 4:9a80b6d63005 288