Received: from PCH.mit.edu (18.7.21.50) by mail.efplus.com (192.168.0.8) with Microsoft SMTP Server (TLS) id 8.3.485.1; Thu, 30 Jul 2020 10:31:47 -0700 Received: from PCH.MIT.EDU (localhost.localdomain [127.0.0.1]) by PCH.mit.edu (8.14.7/8.12.8) with ESMTP id 06UHNV7j020290; Thu, 30 Jul 2020 13:23:43 -0400 Received: from outgoing-exchange-5.mit.edu (OUTGOING-EXCHANGE-5.MIT.EDU [18.9.28.59]) by PCH.mit.edu (8.14.7/8.12.8) with ESMTP id 06UHNUFp020287 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 30 Jul 2020 13:23:30 -0400 Received: from oc11exedge2.exchange.mit.edu (OC11EXEDGE2.EXCHANGE.MIT.EDU [18.9.3.18]) by outgoing-exchange-5.mit.edu (8.14.7/8.12.4) with ESMTP id 06UHN4DU028244 for ; Thu, 30 Jul 2020 13:23:17 -0400 Received: from w92exhyb4.exchange.mit.edu (18.7.71.74) by oc11exedge2.exchange.mit.edu (18.9.3.18) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 30 Jul 2020 13:23:09 -0400 Received: from oc11exhyb3.exchange.mit.edu (18.9.1.99) by w92exhyb4.exchange.mit.edu (18.7.71.74) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 30 Jul 2020 13:23:23 -0400 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.57) by oc11exhyb3.exchange.mit.edu (18.9.1.99) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Thu, 30 Jul 2020 13:23:23 -0400 Received: from MWHPR21CA0072.namprd21.prod.outlook.com (2603:10b6:300:db::34) by BN6PR01MB2356.prod.exchangelabs.com (2603:10b6:404:50::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.17; Thu, 30 Jul 2020 17:23:22 +0000 Received: from CO1NAM03FT019.eop-NAM03.prod.protection.outlook.com (2603:10b6:300:db:cafe::a6) by MWHPR21CA0072.outlook.office365.com (2603:10b6:300:db::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.0 via Frontend Transport; Thu, 30 Jul 2020 17:23:21 +0000 Received: from mail-yb1-f171.google.com (209.85.219.171) by CO1NAM03FT019.mail.protection.outlook.com (10.152.80.176) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.10 via Frontend Transport; Thu, 30 Jul 2020 17:23:21 +0000 Received: by mail-yb1-f171.google.com with SMTP id m200so10685114ybf.10 for ; Thu, 30 Jul 2020 10:23:21 -0700 (PDT) From: Manu Abraham To: Microcontroller discussion list - Public. Sender: "piclist-bounces@mit.edu" Date: Thu, 30 Jul 2020 10:23:06 -0700 Subject: Re: [PIC] Simple GCC question Thread-Topic: [PIC] Simple GCC question Thread-Index: AdZml023ojES6Wy8QDmmDdTxSRR/UQ== Message-ID: References: List-Help: List-Subscribe: , List-Unsubscribe: , In-Reply-To: Reply-To: Microcontroller discussion list - Public. Accept-Language: en-US X-MS-Exchange-Organization-AuthAs: Anonymous X-MS-Exchange-Organization-AuthSource: TS500.efplus4.local X-MS-Has-Attach: X-Auto-Response-Suppress: All X-MS-Exchange-Organization-SenderIdResult: TempError X-MS-Exchange-Organization-PRD: mit.edu X-MS-TNEF-Correlator: received-spf: Pass (protection.outlook.com: domain of gmail.com designates 209.85.219.171 as permitted sender) receiver=protection.outlook.com; client-ip=209.85.219.171; helo=mail-yb1-f171.google.com; dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Eh3QK4l1mxlaLgjGtgk3AsqiHSpHWhk9JwVOLWKhU3U=; b=dHLOijZf/thZCA+i8rqndR/wdq7OogUZKksdjs6TiDOmRKTFWK6YFaSTnajbhGjmDg UQLi0lelDOxzkwLnQJKmmTCczbs1NrqOB5ooaYTkYO17Mcz611/nMe4o8GTh7vNRMd7R fZOSObzKzwTwBsgi8xtiLuxZBO8DCvU9CTEYJjfDQUDvvaDxg6kBqr0Mm/kdRq7dm2x4 nkFJ9xGwd/G3Qy4jfhwu0CehT9xetEqDXUDo8BHokuWlabRd68O73B0BevVVMiDMsshv WvdPSlUlqOTtaqn/+++Sd/Yel3cnmq3c/GFmla2APW1yTt+mfAvjxq6yIqXv7RbkOKQW W+Eg== authentication-results: spf=pass (sender IP is 209.85.219.171) smtp.mailfrom=gmail.com; mit.edu; dkim=pass (signature was verified) header.d=gmail.com; mit.edu; dmarc=pass action=none header.from=gmail.com; errors-to: piclist-bounces@mit.edu list-id: "Microcontroller discussion list - Public." list-post: x-beenthere: piclist@mit.edu x-mailman-version: 2.1.6 x-received: by 2002:a25:c60b:: with SMTP id k11mr5775053ybf.482.1596129799940; Thu, 30 Jul 2020 10:23:19 -0700 (PDT) x-topics: [PIC] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hi Bob, Hi Bob, On Thu, Jul 30, 2020 at 10:21 PM Bob Blick wrote: > > Hi Sean, > > Here it is: > > https://github.com/4ilo/HD44780-Stm32HAL Lcd_HandleTypeDef Lcd_create( Lcd_PortType port[], Lcd_PinType pin[], Lcd_PortType rs_port, Lcd_PinType rs_pin, Lcd_PortType en_port, Lcd_PinType en_pin, Lcd_ModeTypeDef mode) { Lcd_HandleTypeDef lcd; lcd.mode =3D mode; lcd.en_pin =3D en_pin; lcd.en_port =3D en_port; lcd.rs_pin =3D rs_pin; lcd.rs_port =3D rs_port; lcd.data_pin =3D pin; lcd.data_port =3D port; Lcd_init(&lcd); return lcd; } The easiest way ? just .. #define EN_PIN PIN_NO #define LCD_MODE MODExx and eventually do replace: lcd.mode =3D mode with lcd.mode =3D MODExx for the rest of the lcd objects in Lcd_create() I would say a bit too much of over engineering in there for a simple LCD co= nfig. Regards, Manu --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .