wovo / hwlib

C++ OO micro-controller library for close-to-the-hardware programming
Boost Software License 1.0
57 stars 26 forks source link

member channel missing in i2c_bus_bit_banged_scl_sda #22

Closed FStoeltie closed 3 years ago

FStoeltie commented 5 years ago

demo/arduino-due/ oled graphic demo's cannot be compiled because method: 'channel' does not exist.

#include "hwlib.hpp"

int main( void ){

   namespace target = hwlib::target;

   auto scl      = hwlib::target::pin_oc{ hwlib::target::pins::scl };
   auto sda      = hwlib::target::pin_oc{ hwlib::target::pins::sda };

   auto i2c_bus      = hwlib::i2c_bus_bit_banged_scl_sda( scl, sda );

   // i2c_bus channel method does not exist
   //auto oled_channel = i2c_bus.channel( 0x3c );
   //auto oled         = hwlib::glcd_oled_i2c_128x64_direct( oled_channel ); 

   // This works...
   auto oled         = hwlib:: glcd_oled_i2c_128x64_direct(i2c_bus)
   // Constructor glcd_oled_i2c_128x64_direct
   // glcd_oled_i2c_128x64_direct( i2c_bus & bus, uint_fast8_t address = 0x3C ): 
   hwlib::graphics_random_circles( oled );  

}
wovo commented 5 years ago

Ik denk dat je v1oopc-examples niet de meest recente is.

Wouter van Ooijen

0638150444 - HL15 4.060


From: Ferdi Stoeltie notifications@github.com Sent: Wednesday, June 5, 2019 11:22 AM To: wovo/hwlib Cc: Subscribed Subject: [wovo/hwlib] member channel missing in i2c_bus_bit_banged_scl_sda (#22)

demo/arduino-due/ oled graphic demo's cannot be compiled because method: 'channel' does not exist.

include "hwlib.hpp"

int main( void ){

namespace target = hwlib::target;

auto scl = hwlib::target::pin_oc{ hwlib::target::pins::scl }; auto sda = hwlib::target::pin_oc{ hwlib::target::pins::sda };

auto i2c_bus = hwlib::i2c_bus_bit_banged_scl_sda( scl, sda );

// i2c_bus channel method does not exist //auto oled_channel = i2c_bus.channel( 0x3c ); //auto oled = hwlib::glcd_oled_i2c_128x64_direct( oled_channel );

// This works... auto oled = hwlib:: glcd_oled_i2c_128x64_direct(i2c_bus) // Constructor glcd_oled_i2c_128x64_direct // glcd_oled_i2c_128x64_direct( i2c_bus & bus, uint_fast8_t address = 0x3C ): hwlib::graphics_random_circles( oled );

}

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/wovo/hwlib/issues/22?email_source=notifications&email_token=ACE643ADI5GWHBF5XA53N7LPY6AVFA5CNFSM4HTTRY7KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXXBS4A, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACE643CQ5JCZMHQ5XKQGW33PY6AVFANCNFSM4HTTRY7A.