OpenCores
URL https://opencores.org/ocsvn/gecko3/gecko3/trunk

Subversion Repositories gecko3

[/] [gecko3/] [trunk/] [GECKO3COM/] [gecko3com-fw/] [firmware/] [src/] [gecko3com_common.c] - Diff between revs 17 and 29

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 17 Rev 29
Line 115... Line 115...
 
 
 
 
 
 
  /* set autoout length for EP2 and autoin length for EP6 */
  /* set autoout length for EP2 and autoin length for EP6 */
  if(USBCS & bmHSM){
  if(USBCS & bmHSM){
    EP6AUTOINLENH = (512) >> 8;    SYNCDELAY;  /* this is the length for high speed */
    EP6AUTOINLENH = (512) >> 8;    SYNCDELAY;  /* this is the length for */
    EP6AUTOINLENL = (512) & 0xff;  SYNCDELAY;
    EP6AUTOINLENL = (512) & 0xff;  SYNCDELAY;  /* high speed */
  }
  }
  else {
  else {
    EP6AUTOINLENH = 0;     SYNCDELAY;  /* this is the length for full speed */
    EP6AUTOINLENH = 0;     SYNCDELAY;  /* this is the length for full speed */
    EP6AUTOINLENL = 64;   SYNCDELAY;
    EP6AUTOINLENL = 64;   SYNCDELAY;
  }
  }
Line 181... Line 181...
void
void
init_io_ext (void)
init_io_ext (void)
{
{
  xdata uint8_t cmd[2];
  xdata uint8_t cmd[2];
  cmd[0] = 0x03;                 /* write to configuration register */
  cmd[0] = 0x03;                 /* write to configuration register */
  cmd[1] = 0x01;                        /* set Bit 0 (LSB) as input and Bit 1,2 as output, others be irrelevant */
  cmd[1] = 0x01;                       /* set Bit 0 (LSB) as input and Bit */
  i2c_write(I2C_DEV_IO, cmd, 2);
  i2c_write(I2C_DEV_IO, cmd, 2);       /* 1,2 as output, others be irrelevant */
}
}
 
 
void
void
set_led_ext (const uint8_t color)
set_led_ext (const uint8_t color)
{
{

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.