{"action":"created","issue":{"url":"https://api.github.com/repos/olikraus/u8g2/issues/391","repository_url":"https://api.github.com/repos/olikraus/u8g2","labels_url":"https://api.github.com/repos/olikraus/u8g2/issues/391/labels{/name}","comments_url":"https://api.github.com/repos/olikraus/u8g2/issues/391/comments","events_url":"https://api.github.com/repos/olikraus/u8g2/issues/391/events","html_url":"https://github.com/olikraus/u8g2/issues/391","id":265623544,"number":391,"title":"Marlin 32 bit port to U8G2 - need some help","user":{"login":"Bob-the-Kuhn","id":20692583,"avatar_url":"https://avatars0.githubusercontent.com/u/20692583?v=4","gravatar_id":"","url":"https://api.github.com/users/Bob-the-Kuhn","html_url":"https://github.com/Bob-the-Kuhn","followers_url":"https://api.github.com/users/Bob-the-Kuhn/followers","following_url":"https://api.github.com/users/Bob-the-Kuhn/following{/other_user}","gists_url":"https://api.github.com/users/Bob-the-Kuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/Bob-the-Kuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bob-the-Kuhn/subscriptions","organizations_url":"https://api.github.com/users/Bob-the-Kuhn/orgs","repos_url":"https://api.github.com/users/Bob-the-Kuhn/repos","events_url":"https://api.github.com/users/Bob-the-Kuhn/events{/privacy}","received_events_url":"https://api.github.com/users/Bob-the-Kuhn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-10-16T01:29:45Z","updated_at":"2017-10-16T17:47:56Z","closed_at":null,"author_association":"NONE","body":"I've been playing with Marlin 2.0.x in an effort to move over to U8G2.  I've got it partially working with the LPC1768 on a couple of SPI displays so I know that the custom callback & GPIO routines are working..\r\n\r\nCurrently I have two issues I need some help/advice with.\r\n\r\n----\r\n\r\nMarlin has some custom fonts that aren't in the U8G2 format.  Is there any newer advice than \"use bdfconv\" from issue #170?\r\n\r\n----\r\n\r\nMy setup lines are currently variations of:\r\n`u8g2_Setup_st7565_64128n_1(&u8g2, rotation, u8x8_LPC1768_4wire_sw_spi, u8x8_gpio_and_delay_LPC1768);`\r\n\r\nAll is well when they're in UGg2lib.h but that's not a long term solution. \r\n\r\nI have not been able to get it compile when I move them out of the U8G2 library. \r\n\r\nI'm trying to keep the code base changes to a minimum so I'm trying to move them into the current DOGM file.  The top level layout is:\r\n```\r\nMAIN\r\n Setup() {\r\n  ....\r\n  #include \"DOGM.h\"\r\n\r\nfile DOGM.h:\r\n  ...\r\n  #include <U8g2lib.h>\r\n  //extern u8g2_t u8g2;  \r\n  //u8g2_t u8g2;\r\n  //u8g2.begin();  // u8g2 now requires this\r\n  uint8_t u8x8_LPC1768_4wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);\r\n  uint8_t u8x8_gpio_and_delay_LPC1768(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);\r\n\r\n  u8g2_Setup_st7565_64128n_1(&u8g2, rotation, u8x8_LPC1768_4wire_sw_spi, u8x8_gpio_and_delay_LPC1768);\r\n  u8g2_Setup_st7565_64128n_2(&u8g2, rotation, u8x8_LPC1768_4wire_sw_spi, u8x8_gpio_and_delay_LPC1768);\r\n  u8g2_Setup_st7565_64128n_f(&u8g2, rotation, u8x8_LPC1768_4wire_sw_spi, u8x8_gpio_and_delay_LPC1768);\r\n  ...\r\n  #if defined(VIKI2_deisplay)\r\n    U8G2_ST7565_64128N_2_4W_SW_SPI u8g2(U8G2_R0, DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0);\r\n  #endif\r\n  ...\r\n void init_display){\r\n    u8g2.begin()\r\n  }\r\n```\r\nWith this setup I get the following compile error.  I'm using PlatformIO.\r\n```\r\nerror: expected constructor, destructor, or type conversion before '(' token\r\nu8g2_Setup_st7565_64128n_1(&u8g2, rotation, u8x8_LPC1768_4wire_sw_spi, u8x8_gpio_and_delay_LPC1768);\r\n^\r\n```\r\n\r\nThe commented lines are just a few of the variations I've tried.\r\n\r\nI've looked through the Wiki, the examples/issues it points to and RIOT but have not found a detailed example of using U8G2_setup outside the library.\r\n"},"comment":{"url":"https://api.github.com/repos/olikraus/u8g2/issues/comments/336968155","html_url":"https://github.com/olikraus/u8g2/issues/391#issuecomment-336968155","issue_url":"https://api.github.com/repos/olikraus/u8g2/issues/391","id":336968155,"user":{"login":"Bob-the-Kuhn","id":20692583,"avatar_url":"https://avatars0.githubusercontent.com/u/20692583?v=4","gravatar_id":"","url":"https://api.github.com/users/Bob-the-Kuhn","html_url":"https://github.com/Bob-the-Kuhn","followers_url":"https://api.github.com/users/Bob-the-Kuhn/followers","following_url":"https://api.github.com/users/Bob-the-Kuhn/following{/other_user}","gists_url":"https://api.github.com/users/Bob-the-Kuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/Bob-the-Kuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bob-the-Kuhn/subscriptions","organizations_url":"https://api.github.com/users/Bob-the-Kuhn/orgs","repos_url":"https://api.github.com/users/Bob-the-Kuhn/repos","events_url":"https://api.github.com/users/Bob-the-Kuhn/events{/privacy}","received_events_url":"https://api.github.com/users/Bob-the-Kuhn/received_events","type":"User","site_admin":false},"created_at":"2017-10-16T17:47:56Z","updated_at":"2017-10-16T17:47:56Z","author_association":"NONE","body":"I'm using PlatformIO within Atom to compile for the Re-ARM board which has a LPC1768 mcu.  \r\n\r\nHere's a dropbox link to my [software](https://www.dropbox.com/sh/iovm5oh6cl9j9mt/AAAZNF2niT0WoTp7gPncEko7a?dl=0) .  \r\n\r\nHere's the [repository](https://github.com/Bob-the-Kuhn/RCBugfix-M43-and-spindle/tree/U8G2-port) .  The branch name is U8G2-port.\r\n\r\nI tried including u8g2.h but that didn't help.\r\n\r\nTo see the compile error \r\n1. Use the dropbox link to download the software.\r\n2. Within Platformio/Atom set the project folder to **RCBugfix-M43-and-spindle**\r\n3. Select **PIO Build (Re-ARM)** to start the build process.  After about 60 seconds the \"expected constructor, destructor, or type conversion\" errors will pop up.\r\n\r\nTo enable passing the pins into U8G2 I've enabled  **U8X8_USE_PINS** and **ARDUINO_AVR_DIGISPARK** via build flags in the **platformio.ini** file.\r\n\r\nThe compiler is complaining about lines 51-53 s in the file **RCBugfix-M43-and-spindle\\Marlin\\src\\lcd\\ultralcd_impl_DOGM.h**\r\n\r\n----\r\n\r\nAll I know about the Marlin fonts is what's in the current Marlin repository.  I have no idea where the BDF files are at.\r\n\r\nI tried importing the Marlin fonts into Fony 1.4.6 but got nowhere. Most likely it's my lack of knowledge about font formats that's the problem.\r\n\r\nIt could be that I need 1.4.7.  I can't find that on the web.  Could one of you please post Fony 1.4.7 or point me to it?\r\n\r\nThe fonts I need to convert are all in the Marlin\\src\\lcd\\dogm directory."}}
{"actor":{"display_login":"Bob-the-Kuhn"}}