Giter VIP home page Giter VIP logo

Comments (7)

Polarisru avatar Polarisru commented on August 16, 2024

Hello, this should be a problem with a Mac version probably. Nobody has built it yet and I see some problems in the UART processing code: I have only MINGW32 and __linux defines there, so I guess Mac doesn't know what to do. Unfortunately I don't have a Mac, so I can't find a solution for this issue :( You have to write some Mac code for writing and reading a serial port to make it possible.

from updiprog.

2ni avatar 2ni commented on August 16, 2024

Hey, I found a solution, but I can't make a pull. For macs, you can use the same as for __linux.
So you can just replace all
#ifdef __linux
with
if defined(__APPLE__) || defined(__linux)

I also like to control RTS and DTR pins. Would it be possible to add a flag to set/clear rts and dts?
The code to eg clear RTS and set DTR would be as follows in com.c COM_Open() just after the open() command:

#include <sys/ioctl.h>
...

int RTS_flag;
RTS_flag = TIOCM_RTS;
ioctl(fd, TIOCMBIC, &RTS_flag); // TIOCMBIS: set, TIOCMBIC: clear
int DTR_flag;
DTR_flag = TIOCM_DTR;
ioctl(fd, TIOCMBIS, &DTR_flag); // TIOCMBIS: set, TIOCMBIC: clear

from updiprog.

Polarisru avatar Polarisru commented on August 16, 2024

Can you make a pull request?
Yes, I can add these pins, what do you want to do with them? I am asking because of flags, how should I name them?

from updiprog.

2ni avatar 2ni commented on August 16, 2024

ok, will do. I created a programmer which can switch between uart and updi on the same serial terminal connected to the computer. I use the DTR line to control if I use uart or updi on the mcu. For this reason I need to clear DTR and set RTS.
I was thinking of 2 additional parameters to set or clear dtr and rts (one for each). (-d and -r are already taken :-()

from updiprog.

2ni avatar 2ni commented on August 16, 2024

could it be that I have no permissions to push?

~/updiprog support-mac-os ?1 ❯ git push -u origin support-mac-os                                                apricot 3.9.0
ERROR: Permission to Polarisru/updiprog.git denied to 2ni.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

from updiprog.

Polarisru avatar Polarisru commented on August 16, 2024

I have sent you an invite, it will be probably possible to push to the repository directly after accepting it

from updiprog.

2ni avatar 2ni commented on August 16, 2024

Thanks! Do you think I can re-use the argument onDTR to set DTR and clear RTS? I would also do a pull for it then

from updiprog.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.