cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32 spi

SDall
Associate II

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!

1 REPLY 1
SDall
Associate II

Int result[2] i' m sorry!​