Skip to main content
SDall
Associate III
October 14, 2019
Question

Stm32 spi

  • October 14, 2019
  • 1 reply
  • 652 views

I have this code in Arduino,but i need translate in hall library,could have i the translate?

Tested code:

Code: [Select]

#include "SPI.h"

 unsigned int result = 0;

 unsigned int result1 = 0;

 unsigned int result2 = 0;

void setup ()

{

Serial.begin(9600);

SPI.begin();

SPI.setBitOrder(MSBFIRST);

}

void loop () {

digitalWrite(SS, LOW);

 //Reading 16 bit frame (the first half of 16-bit SPI transfer)

 result[0]= SPI.transfer(0b00000000);

 result[1]=SPI.transfer(0b000000);

 digitalWrite(SS, HIGH);

  Thanks!

This topic has been closed for replies.

1 reply

SDall
SDallAuthor
Associate III
October 14, 2019

Int result[2] i' m sorry!​