Skip to content

Input pins are set to output type, buggy and/or dangerous if using inputs #23

Description

@tranzistoren

In mpsse.c, lines 274-275:

		/* Clock, data out, chip select pins are outputs; all others are inputs. */
		mpsse->tris = DEFAULT_TRIS;

in mpsse.h, line 114:

'#define DEFAULT_TRIS            (SK | DO | CS | GPIO0 | GPIO1 | GPIO2 | GPIO3)  /* SK/DO/CS and GPIOs are outputs, DI is an input */

Pins that should be set as inputs are set as outputs.
Quick fix:

#define DEFAULT_TRIS            (SK | DO | CS)  /* SK/DO/CS are outputs, others are inputs */

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions