【海思应用篇】-(8)GPIO模拟I2C

xclshwd 2020-08-30 09:57:38 3983
【海思应用篇】-(8)GPIO模拟I2C
1.前言

有时候芯片上i2c数量不多,我们可以通过gpio模拟i2c时序,达到通过i2c与芯片交互目的。
gpio_i2c.h


#ifndef _GPIO_I2C_H
#define _GPIO_I2C_H

#if 1
#define GPIO_I2C_MAGIC_BASE 'I'
#define GPIO_I2C_READ_BYTE   _IOR(GPIO_I2C_MAGIC_BASE,0x01,int)
#define GPIO_I2C_WRITE_BYTE  _IOW(GPIO_I2C_MAGIC_BASE,0x02,int)

#define GPIO_I2C_READ_DWORD   _IOR(GPIO_I2C_MAGIC_BASE,0x03,int)
#define GPIO_I2C_WRITE_DWORD  _IOR(GPIO_I2C_MAGIC_BASE,0x04,int)
#else
#define GPIO_I2C_READ_BYTE    0x01
#define GPIO_I2C_WRITE_BYTE   0x02

#define GPIO_I2C_READ_DWORD   0x03
#define GPIO_I2C_WRITE_DWORD  0x04
#endif

typedef struct _cx25838_regs_data
{
    unsigned int chip;  //0x88 or 0x8a
    unsigned int addr;  //reg address
    unsigned int hibit;
    unsigned int lobit;
    unsigned int data;
} cx25838_regs_data;

unsigned char gpio_i2c_read(unsigned char devaddress, unsigned char address);
void          gpio_i2c_write(unsigned char devaddress, unsigned char address, unsigned char value);
unsigned int  gpio_i2c2_read(unsigned char devaddress, unsigned short address, int num_bytes);
void          gpio_i2c2_write(unsigned char devaddress, unsigned short address, unsigned int data, int num_bytes);

unsigned int  gpio_i2c2_read_1bytesubaddr(unsigned char devaddress, unsigned char address, int num_bytes);
void          gpio_i2c2_write_1bytesubaddr(unsigned char devaddress, unsigned char address, unsigned int data, int num_bytes);

#endif
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
<

gpio_i2c.c


#include <linux/module.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
#include <linux/fcntl.h>

#include <linux/init.h>
#include <linux/delay.h>
#include <linux/proc_fs.h>
#include <linux/workqueue.h>

#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/io.h>

#include "gpio_i2c.h" 

#define GPIO_0_BASE 0x12210000
#define SCL                 (1 << 7)    /* GPIO 12_7 */
#define SDA                 (1 << 6)    /* GPIO 12_6 */
#define GPIO_I2C_SCL_REG    IO_ADDRESS(GPIO_0_BASE + 0x200)
#define GPIO_I2C_SDA_REG    IO_ADDRESS(GPIO_0_BASE + 0x100)
#define GPIO_I2C_SCLSDA_REG IO_ADDRESS(GPIO_0_BASE + 0x300)

#define GPIO_0_DIR IO_ADDRESS(GPIO_0_BASE + 0x400)

#define HW_REG(reg)         *((volatile unsigned int *)(reg))
#define DELAY(us)           time_delay_us(us)

/* 
 * I2C by GPIO simulated  clear 0 routine.
 *
 * @param whichline: GPIO control line
 *
 */
static void i2c_clr(unsigned char whichline)
{
    unsigned char regvalue;

    if(whichline == SCL)
    {
        regvalue = HW_REG(GPIO_0_DIR);
        regvalue |= SCL;
        HW_REG(GPIO_0_DIR) = regvalue;

        HW_REG(GPIO_I2C_SCL_REG) = 0;
        return;
    }
    else if(whichline == SDA)
    {
        regvalue = HW_REG(GPIO_0_DIR);
        regvalue |= SDA;
        HW_REG(GPIO_0_DIR) = regvalue;

        HW_REG(GPIO_I2C_SDA_REG) = 0;
        return;
    }
    else if(whichline == (SDA|SCL))
    {
        regvalue = HW_REG(GPIO_0_DIR);
        regvalue |= (SDA|SCL);
        HW_REG(GPIO_0_DIR) = regvalue;

        HW_REG(GPIO_I2C_SCLSDA_REG) = 0;
        return;
    }
    else
    {
        printk("Error input.\n");
        return;
    }

}

/* 
 * I2C by GPIO simulated  set 1 routine.
 *
 * @param whichline: GPIO control line
 *
 */
static void  i2c_set(unsigned char whichline)
{
    unsigned char regvalue;

    if(whichline == SCL)
    {
        regvalue = HW_REG(GPIO_0_DIR);
        regvalue |= SCL;
        HW_REG(GPIO_0_DIR) = regvalue;

        HW_REG(GPIO_I2C_SCL_REG) = SCL;
        return;
    }
    else if(whichline == SDA)
    {
        regvalue = HW_REG(GPIO_0_DIR);
        regvalue |= SDA;
        HW_REG(GPIO_0_DIR) = regvalue;

        HW_REG(GPIO_I2C_SDA_REG) = SDA;
        return;
    }
    else if(whichline == (SDA|SCL))
    {
        regvalue = HW_REG(GPIO_0_DIR);
        regvalue |= (SDA|SCL);
        HW_REG(GPIO_0_DIR) = regvalue;

        HW_REG(GPIO_I2C_SCLSDA_REG) = (SDA|SCL);
        return;
    }
    else
    {
        printk("Error input.\n");
        return;
    }
}

/*
 *  delays for a specified number of micro seconds rountine.
 *
 *  @param usec: number of micro seconds to pause for
 *
 */
void time_delay_us(unsigned int usec)
{
    //int i,j;

    udelay(1);
    /*
    for(i=0;i<usec * 50;i++)
    {
        for(j=0;j<4700;j++)
        {;}
    }*/
}

/* 
 * I2C by GPIO simulated  read data routine.
 *
 * @return value: a bit for read 
 *
 */

static unsigned char i2c_data_read(void)
{
    unsigned char regvalue;

    regvalue = HW_REG(GPIO_0_DIR);
    regvalue &= (~SDA);
    HW_REG(GPIO_0_DIR) = regvalue;
    DELAY(1);

    regvalue = HW_REG(GPIO_I2C_SDA_REG);
    if((regvalue&SDA) != 0)
        return 1;
    else
        return 0;
}

/*
 * sends a start bit via I2C rountine.
 *
 */
static void i2c_start_bit(void)
{
        DELAY(1);
        i2c_set(SDA | SCL);
        DELAY(1);
        i2c_clr(SDA);
        DELAY(1);
}

/*
 * sends a stop bit via I2C rountine.
 *
 */
static void i2c_stop_bit(void)
{
        /* clock the ack */
        DELAY(1);
        i2c_set(SCL);
        DELAY(1); 
        i2c_clr(SCL);  

        /* actual stop bit */
        DELAY(1);
        i2c_clr(SDA);
        DELAY(1);
        i2c_set(SCL);
        DELAY(1);
        i2c_set(SDA);
        DELAY(1);
}

/*
 * sends a character over I2C rountine.
 *
 * @param  c: character to send
 *
 */
static void i2c_send_byte(unsigned char c)
{
    int i;
    local_irq_disable();
    for (i=0; i<8; i++)
    {
        DELAY(1);
        i2c_clr(SCL);
        DELAY(1);

        if (c & (1<<(7-i)))
            i2c_set(SDA);
        else
            i2c_clr(SDA);

        DELAY(1);
        i2c_set(SCL);
        DELAY(1);
        i2c_clr(SCL);
    }
    DELAY(1);
   // i2c_set(SDA);
    local_irq_enable();
}

/*  receives a character from I2C rountine.
 *
 *  @return value: character received
 *
 */
static unsigned char i2c_receive_byte(void)
{
    int j=0;
    int i;
    unsigned char regvalue;

    local_irq_disable();
    for (i=0; i<8; i++)
    {
        DELAY(1);
        i2c_clr(SCL);
        DELAY(1);
        i2c_set(SCL);

        regvalue = HW_REG(GPIO_0_DIR);
        regvalue &= (~SDA);
        HW_REG(GPIO_0_DIR) = regvalue;
        DELAY(1);

        if (i2c_data_read())
            j+=(1<<(7-i));

        DELAY(1);
        i2c_clr(SCL);
    }
    local_irq_enable();
    DELAY(1);
   // i2c_clr(SDA);
   // DELAY(1);

    return j;
}

/*  receives an acknowledge from I2C rountine.
 *
 *  @return value: 0--Ack received; 1--Nack received
 *          
 */
static int i2c_receive_ack(void)
{
    int nack;
    unsigned char regvalue;

    DELAY(1);

    regvalue = HW_REG(GPIO_0_DIR);
    regvalue &= (~SDA);
    HW_REG(GPIO_0_DIR) = regvalue;

    DELAY(1);
    i2c_clr(SCL);
    DELAY(1);
    i2c_set(SCL);
    DELAY(1);

    nack = i2c_data_read();

    DELAY(1);
    i2c_clr(SCL);
    DELAY(1);
  //  i2c_set(SDA);
  //  DELAY(1);

    if (nack == 0)
        return 1; 

    return 0;
}

#if 0
static void i2c_send_ack(void)
{
    DELAY(1);
    i2c_clr(SCL);
    DELAY(1);
    i2c_set(SDA);
    DELAY(1);
    i2c_set(SCL);
    DELAY(1);
    i2c_clr(SCL);
    DELAY(1);
    i2c_clr(SDA);
    DELAY(1);
}
#endif

EXPORT_SYMBOL(gpio_i2c_read);
unsigned char gpio_i2c_read(unsigned char devaddress, unsigned char address)
{
    int rxdata;

    i2c_start_bit();
    i2c_send_byte((unsigned char)(devaddress));
    i2c_receive_ack();
    i2c_send_byte(address);
    i2c_receive_ack();   
    i2c_start_bit();
    i2c_send_byte((unsigned char)(devaddress) | 1);
    i2c_receive_ack();
    rxdata = i2c_receive_byte();
    //i2c_send_ack();
    i2c_stop_bit();

    return rxdata;
}

EXPORT_SYMBOL(gpio_i2c_write);
void gpio_i2c_write(unsigned char devaddress, unsigned char address, unsigned char data)
{
    i2c_start_bit();
    i2c_send_byte((unsigned char)(devaddress));
    i2c_receive_ack();
    i2c_send_byte(address);
    i2c_receive_ack();
    i2c_send_byte(data); 
   // i2c_receive_ack();//add by hyping for tw2815
    i2c_stop_bit();
}

EXPORT_SYMBOL(gpio_i2c2_read);
unsigned int gpio_i2c2_read(unsigned char devaddress, unsigned short address, int num_bytes)
{
    unsigned char rxdata;
    unsigned int  ret = 0x00;
    int i;

#if 1
    for (i=0; i<num_bytes; i++) {
        i2c_start_bit();
        i2c_send_byte((unsigned char)(devaddress));
        i2c_receive_ack();
        i2c_send_byte((unsigned char)((address >> 8) & 0xff));
        i2c_receive_ack();
        i2c_send_byte((unsigned char)(address & 0xff));
        i2c_receive_ack();   

        i2c_start_bit();
        i2c_send_byte((unsigned char)(devaddress) | 1);
        i2c_receive_ack();
        rxdata = i2c_receive_byte();
        //      i2c_send_nack();
        i2c_stop_bit();

        ret |= (rxdata << (i * 8));

        address ++;
    }
#else
    i2c_start_bit();
    i2c_send_byte((unsigned char)(devaddress));
    i2c_receive_ack();
    i2c_send_byte((unsigned char)((address >> 8) & 0xff));
    i2c_receive_ack();
    i2c_send_byte((unsigned char)(address & 0xff));
    i2c_receive_ack();   

    i2c_start_bit();
    i2c_send_byte((unsigned char)(devaddress) | 1);
    i2c_receive_ack();
    for (i=0; i<num_bytes-1; i++) {
        rxdata = i2c_receive_byte();
        i2c_send_ack();
        ret |= rxdata;
        ret <<= 8;
    }
    rxdata = i2c_receive_byte();
    //  i2c_send_ack();
    i2c_stop_bit(ACK);
    ret |= rxdata;
#endif

    //  printk("dev=%x, reg =%x, rxd=%x\n", devaddress, address, ret);

    return ret;
}

EXPORT_SYMBOL(gpio_i2c2_write);
void gpio_i2c2_write(unsigned char devaddress, unsigned short address, unsigned int data, int num_bytes)
{
    int i;

    //  printk("wr: %x %x %x %x\n", devaddress, address, data, num_bytes);
#if 1
    for (i=0; i<num_bytes; i++) {
        i2c_start_bit();
        i2c_send_byte((unsigned char)(devaddress));
        i2c_receive_ack();
        i2c_send_byte((unsigned char)((address >> 8) & 0xff));
        i2c_receive_ack();
        i2c_send_byte((unsigned char)(address & 0xff));
        i2c_receive_ack();   

        i2c_send_byte((unsigned char)((data >> (i*8)) & 0xff)); 
        i2c_receive_ack();
        i2c_stop_bit();
        address++;
        //  DELAY(100);
    }
#else
    i2c_start_bit();
    i2c_send_byte((unsigned char)(devaddress));
    i2c_receive_ack();
    i2c_send_byte((unsigned char)((address >> 8) & 0xff));
    i2c_receive_ack();
    i2c_send_byte((unsigned char)(address & 0xff));
    i2c_receive_ack();
    for (i=0; i<num_bytes; i++) {
        i2c_send_byte((unsigned char)((data >> (i*8)) & 0xff)); 
        i2c_receive_ack();
    }
    //  i2c_send_byte((unsigned char)((data >> (i*8)) & 0xff)); 
    i2c_stop_bit(ACK);
#endif
}
//在发布版本时注释

#if 1
void RegMaskWrite(unsigned char chip_addr, unsigned short addr, int lo_bit, int hi_bit, int data)
{
    int i, num_bytes;
    unsigned int value = 0;

    num_bytes = 4;

    value = gpio_i2c2_read(chip_addr, addr, num_bytes);

    for (i=lo_bit; i<=hi_bit; i++) {
        value &= ~(1<<i);
    }

    value |= (data << lo_bit);

    gpio_i2c2_write(chip_addr, addr, value, num_bytes);
}

#endif

unsigned int gpio_i2c2_read_1bytesubaddr(unsigned char devaddress, unsigned char address, int num_bytes)
{
    unsigned int value = 0;
    value = gpio_i2c2_read(devaddress, address, num_bytes);

    return value;

}

void gpio_i2c2_write_1bytesubaddr(unsigned char devaddress, unsigned char address, unsigned int data, int num_bytes)
{
    gpio_i2c2_write(devaddress, address, data, num_bytes);

}

long gpioi2c_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
    unsigned int val;

    char device_addr;
    int reg_val,reg_addr;
    cx25838_regs_data val1;
    unsigned char chip_addr;
    int addr;
    int lo_bit;
    int hi_bit;
    int data;

    switch(cmd)
    {
        case GPIO_I2C_READ_BYTE:
            val = *(unsigned int *)arg;
            device_addr = (val&0xff000000)>>24;
            reg_addr = (val&0xff0000)>>16;

            reg_val = gpio_i2c_read(device_addr, reg_addr);
            *(unsigned int *)arg = (val&0xffff0000)|reg_val;    
            //printk("Func:%s, line:%d  dev_addr=0x%x, reg_addr=0x%x, value=0x%x\n", 
            //    __FUNCTION__, __LINE__, device_addr, reg_addr, reg_val);
            break;

        case GPIO_I2C_WRITE_BYTE:
            val = *(unsigned int *)arg;
            device_addr = (val&0xff000000)>>24;
            reg_addr = (val&0xff0000)>>16;

            reg_val = val&0xffff;
            gpio_i2c_write(device_addr, reg_addr, reg_val);
            break;  

        case GPIO_I2C_READ_DWORD:
            val = *(unsigned int *)arg;
            device_addr = (val&0xff000000)>>24;
            reg_addr = (val&0xffff00)>>8;

            reg_val = gpio_i2c2_read(device_addr, reg_addr, 4);
            *(unsigned int *)arg = reg_val;         
            //printk("Func:%s, line:%d  dev_addr=0x%x, reg_addr=0x%x, value=0x%x\n", 
            //    __FUNCTION__, __LINE__, device_addr, reg_addr, reg_val);
            break;

        case GPIO_I2C_WRITE_DWORD:
            val1 = *(cx25838_regs_data *)arg;

            chip_addr=val1.chip&0xff;
            addr=val1.addr;
            lo_bit=val1.lobit;
            hi_bit=val1.hibit;
            data=val1.data;
            //printk("Func:%s, line:%d  dev_addr=0x%x, reg_addr=0x%x, lo_bit=0x%x, hi_bit=0x%x, data=0x%x\n", 
            //__FUNCTION__, __LINE__, chip_addr, addr, lo_bit, hi_bit, data);

            RegMaskWrite(chip_addr, addr, lo_bit, hi_bit, data);
            break;      

        default:
            return -1;
    }
    return 0;
}

int gpioi2c_open(struct inode * inode, struct file * file)
{
    return 0;
}
int gpioi2c_close(struct inode * inode, struct file * file)
{
    return 0;
}

static struct file_operations gpioi2c_fops = {
    .owner          = THIS_MODULE,
    //.ioctl          = gpioi2c_ioctl,
    .unlocked_ioctl = gpioi2c_ioctl,
    .open           = gpioi2c_open,
    .release        = gpioi2c_close
};

static struct miscdevice gpioi2c_dev = {
   .minor       = MISC_DYNAMIC_MINOR,
   .name        = "gpioi2c",
   .fops        = &gpioi2c_fops,
};

static int __init gpio_i2c_init(void)
{
    int ret;
    //unsigned int reg;

    ret = misc_register(&gpioi2c_dev);
    if(0 != ret)
    {
        return -1;
    }

#if 1         
    //printk(KERN_INFO OSDRV_MODULE_VERSION_STRING "\n");            
    //reg = HW_REG(SC_PERCTRL1);
    //reg |= 0x00004000;
    //HW_REG(SC_PERCTRL1) = reg;
    i2c_set(SCL|SDA);
#endif              
    return 0;    
}

static void __exit gpio_i2c_exit(void)
{
    misc_deregister(&gpioi2c_dev);
}

module_init(gpio_i2c_init);
module_exit(gpio_i2c_exit);

#ifdef MODULE
//#include <linux/compile.h>
#endif
//MODULE_INFO(build, UTS_VERSION);
MODULE_LICENSE("GPL");
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  • 357
  • 358
  • 359
  • 360
  • 361
  • 362
  • 363
  • 364
  • 365
  • 366
  • 367
  • 368
  • 369
  • 370
  • 371
  • 372
  • 373
  • 374
  • 375
  • 376
  • 377
  • 378
  • 379
  • 380
  • 381
  • 382
  • 383
  • 384
  • 385
  • 386
  • 387
  • 388
  • 389
  • 390
  • 391
  • 392
  • 393
  • 394
  • 395
  • 396
  • 397
  • 398
  • 399
  • 400
  • 401
  • 402
  • 403
  • 404
  • 405
  • 406
  • 407
  • 408
  • 409
  • 410
  • 411
  • 412
  • 413
  • 414
  • 415
  • 416
  • 417
  • 418
  • 419
  • 420
  • 421
  • 422
  • 423
  • 424
  • 425
  • 426
  • 427
  • 428
  • 429
  • 430
  • 431
  • 432
  • 433
  • 434
  • 435
  • 436
  • 437
  • 438
  • 439
  • 440
  • 441
  • 442
  • 443
  • 444
  • 445
  • 446
  • 447
  • 448
  • 449
  • 450
  • 451
  • 452
  • 453
  • 454
  • 455
  • 456
  • 457
  • 458
  • 459
  • 460
  • 461
  • 462
  • 463
  • 464
  • 465
  • 466
  • 467
  • 468
  • 469
  • 470
  • 471
  • 472
  • 473
  • 474
  • 475
  • 476
  • 477
  • 478
  • 479
  • 480
  • 481
  • 482
  • 483
  • 484
  • 485
  • 486
  • 487
  • 488
  • 489
  • 490
  • 491
  • 492
  • 493
  • 494
  • 495
  • 496
  • 497
  • 498
  • 499
  • 500
  • 501
  • 502
  • 503
  • 504
  • 505
  • 506
  • 507
  • 508
  • 509
  • 510
  • 511
  • 512
  • 513
  • 514
  • 515
  • 516
  • 517
  • 518
  • 519
  • 520
  • 521
  • 522
  • 523
  • 524
  • 525
  • 526
  • 527
  • 528
  • 529
  • 530
  • 531
  • 532
  • 533
  • 534
  • 535
  • 536
  • 537
  • 538
  • 539
  • 540
  • 541
  • 542
  • 543
  • 544
  • 545
  • 546
  • 547
  • 548
  • 549
  • 550
  • 551
  • 552
  • 553
  • 554
  • 555
  • 556
  • 557
  • 558
  • 559
  • 560
  • 561
  • 562
  • 563
  • 564
  • 565
  • 566
  • 567
  • 568
  • 569
  • 570
  • 571
  • 572
  • 573
  • 574
  • 575
  • 576
  • 577
  • 578
  • 579
  • 580
  • 581
  • 582
  • 583
  • 584
  • 585
  • 586
  • 587
  • 588
  • 589
  • 590
  • 591
  • 592
  • 593
  • 594
  • 595
  • 596
  • 597
  • 598
  • 599
  • 600
  • 601
  • 602
  • 603
  • 604
  • 605
  • 606
<
声明:本文内容由易百纳平台入驻作者撰写,文章观点仅代表作者本人,不代表易百纳立场。如有内容侵权或者其他问题,请联系本站进行删除。
xclshwd
红包 1 收藏 评论 打赏
评论
1个
内容存在敏感词
手气红包
  • 消失 2022-03-02 10:08:37
    回复
    最近也在调 2字节寄存器地址和两字节数据返回的 写设备地址有ACK 其他的都没有 不知道为啥
相关专栏
置顶时间设置
结束时间
删除原因
  • 广告/SPAM
  • 恶意灌水
  • 违规内容
  • 文不对题
  • 重复发帖
打赏作者
易百纳技术社区
xclshwd
您的支持将鼓励我继续创作!
打赏金额:
¥1易百纳技术社区
¥5易百纳技术社区
¥10易百纳技术社区
¥50易百纳技术社区
¥100易百纳技术社区
支付方式:
微信支付
支付宝支付
易百纳技术社区微信支付
易百纳技术社区
打赏成功!

感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~

举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

审核成功

发布时间设置
发布时间:
是否关联周任务-专栏模块

审核失败

失败原因
备注
拼手气红包 红包规则
祝福语
恭喜发财,大吉大利!
红包金额
红包最小金额不能低于5元
红包数量
红包数量范围10~50个
余额支付
当前余额:
可前往问答、专栏板块获取收益 去获取
取 消 确 定

小包子的红包

恭喜发财,大吉大利

已领取20/40,共1.6元 红包规则

    易百纳技术社区