From nobody Tue Mar 07 12:01:29 2023 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PWDZJ1SB4z3w4Yy for ; Tue, 7 Mar 2023 12:01:44 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PWDZH6Wqqz3mw4 for ; Tue, 7 Mar 2023 12:01:43 +0000 (UTC) (envelope-from tomek@cedro.info) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x834.google.com with SMTP id c19so13881051qtn.13 for ; Tue, 07 Mar 2023 04:01:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; t=1678190503; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vpplzxo2PwGDsqUaXDkqn48i9DkJn4EIc9BabaXT/AQ=; b=Wl01PAAOambSu0FEEv34TKd7KDc/BHbwOejUvYLEUk3VKTitdk7vteDpt7+gsf52dm gcb6tZYOKSOD2fBejge3gMymoMzaKb66Lc0Zd7EcyNGJGf9o3BhRbj15/uBmFjT8ZfzE ZRIwVDgiBRBAqRdT4yuL99wbkuCtH62YtF074Uz50GSLejf2yiKhzcfqMt6dum94LtoG b0Y16S4aua0QxMVJKc+w1eeOV45QVT4namnKliJIr7r7M1P9ZGfJ1hdb2lSdiBNXVnKM e+gpW+ku4NIaUYhvoZX1aqTgU25h/DnmRBsY3PaUec8NfsKJLvZhX5WCugEMEln4SKHd UdNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678190503; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vpplzxo2PwGDsqUaXDkqn48i9DkJn4EIc9BabaXT/AQ=; b=pX4SdSEmKmK/nrrYSKpwcY1lQnfWqjPTZf7IhtJvHEsBUj9XH/Dnqt4znrLpo/krVj /Z3wh6iFW2YiJQdBvCmIX8G9ULJMwhh5bO+dNWcgoq/hvFw4CXYbLNzZ9gFGYlglhbrO QXhZq+ttTDenJvGG7q3P2bhPc4QS2mB3MAloGyrte0cfcaYeIJpFCXeJBG/2BfsS4X23 c89aU8AckrGqSsbX51BzL/D1/mIXf2d8yYdH/mI2kx5bme3DMLxl29fquGwUF6zDLLx/ h+QuHEKWrCXMgSwS4StMmrlgPWPHvvrVYCIGxEwyyQuH9CCU8aI7CCkk2qNErTgTNGb2 Rg/Q== X-Gm-Message-State: AO0yUKXXnNq3wNdXQ9J5SlJepjZoX8Hxe/iHhJd6Ja0hQW9saBhH0PM7 e4ZFSafn+fni9dZOifxUuRwCht7GZQNuCSaca4A= X-Google-Smtp-Source: AK7set8r4SgOTlEZgbAclohMHV5Kev3o7U75rc7ZSfJ5voiiKTmiQ+aN+c/fHp4y535SsrVIr8FtxA== X-Received: by 2002:a05:622a:284:b0:3bf:d6ba:590b with SMTP id z4-20020a05622a028400b003bfd6ba590bmr24033624qtw.65.1678190502757; Tue, 07 Mar 2023 04:01:42 -0800 (PST) Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com. [209.85.128.170]) by smtp.gmail.com with ESMTPSA id d1-20020ac85ac1000000b003b9e1d3a502sm9626563qtd.54.2023.03.07.04.01.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Mar 2023 04:01:42 -0800 (PST) Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-5384ff97993so240859847b3.2 for ; Tue, 07 Mar 2023 04:01:42 -0800 (PST) X-Received: by 2002:a81:ac59:0:b0:52e:bb3e:15aa with SMTP id z25-20020a81ac59000000b0052ebb3e15aamr8477478ywj.7.1678190501980; Tue, 07 Mar 2023 04:01:41 -0800 (PST) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Tomek CEDRO Date: Tue, 7 Mar 2023 13:01:29 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Driver for FT232H To: Olivier Cc: freebsd-questions@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4PWDZH6Wqqz3mw4 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, Mar 7, 2023 at 6:36=E2=80=AFAM Olivier wrote: > Hi, > I was watching a video about the adapter FT232H that permits to have > GPIO ports on a PC. > All documentation I could find is mentioning Python. > I am wondering if there is any library that could use such adapter in C? > Best regards, > Olivier devel/libftdi1 devel/libftdi https://www.ftdichip.com/old2020/Products/ICs/FT2232H.html it can work in "bitbang mode" that resembles parallel port read write, and "mpsse" multi purpose serial engine than can clock in/out some series of bytes so you can build a serial bus adapter (i.e. spi, i2c, etc) that is faster than bitbanging the bus. note voltages on your target and absolute maximum ratings of the chip. note usb latency that limits the possible operations speed. have fun! :-) --=20 CeDeROM, SQ7MHZ, http://www.tomek.cedro.info