Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Problem with connect OLED display I2C (error: 'TWSR' was not declared in this scope) #8

@AndyZotya

Description

@AndyZotya

D:\Users\Neo\Documents\Arduino\libraries\OLED_I2C\hardware/avr/HW_AVR.h: In member function 'void OLED::_initTWI()':
D:\Users\Neo\Documents\Arduino\libraries\OLED_I2C\hardware/avr/HW_AVR.h:14:9: error: 'TWSR' was not declared in this scope
__cbi2(TWSR, TWPS0);
D:\Users\Neo\Documents\Arduino\libraries\OLED_I2C\hardware/avr/HW_AVR.h:14:15: error: 'TWPS0' was not declared in this scope
__cbi2(TWSR, TWPS0);
^
D:\Users\Neo\Documents\Arduino\libraries\OLED_I2C\hardware/avr/HW_AVR.h:15:15: error: 'TWPS1' was not declared in this scope

__cbi2(TWSR, TWPS1);

D:\Users\Neo\Documents\Arduino\libraries\OLED_I2C\hardware/avr/HW_AVR.h:16:2: error: 'TWBR' was not declared in this scope

TWBR = ((F_CPU / TWI_FREQ) - 16) / 2;

D:\Users\Neo\Documents\Arduino\libraries\OLED_I2C\hardware/avr/HW_AVR.h:19:2: error: 'TWCR' was not declared in this scope

TWCR = _BV(TWEN) | _BV(TWIE)/* | _BV(TWEA)*/;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions