Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:d043a9b85963, committed 2017-03-29
- Comitter:
- cesarcazal
- Date:
- Wed Mar 29 02:17:17 2017 +0000
- Parent:
- 0:58277eb442ad
- Commit message:
- EJEMPLO NRF5X
Changed in this revision
--- a/vector_int24.cpp Fri Aug 26 21:33:39 2016 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-
-
-#include "vector_int24.h"
-#include "mbed.h"
-//LOS VALORES SON DEVUELTOS EN FORMATO INT32; SIN EMBARGO SOLO SE REALIZAN CONVERSIONES EQUIVALENTES A VARIABLES DE 24BITS
-
-int32_t pointer_to_int32(uint8_t *vect) {
- int aux1;
- int32_t result=0;
- for (aux1 = 2; aux1>0; aux1--){
- result= result|*(vect+aux1);
- result <<= 8;
- if((aux1==1)&&(*(vect+2)>127))
- result = result|(0xff000000);
- }
- result= *vect|result;
- return (result);
-}
-
-void int32_to_pointer (int32_t dato, uint8_t *point){
- *(point) = dato;
- *(point+1) = dato>> 8;
- *(point+2) = dato >> 16;
-}
\ No newline at end of file
--- a/vector_int24.h Fri Aug 26 21:33:39 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -#ifndef MBED_VECTOR_INT24_H -#define MBED_VECTOR_INT24_H - -#include "mbed.h" - -//LOS VALORES SON DEVUELTOS EN FORMATO INT32; SIN EMBARGO SOLO SE REALIZAN CONVERSIONES EQUIVALENTES A VARIABLES DE 24BITS - -int32_t pointer_to_int32 (uint8_t *vect);//función que devuelve un int32 acorde al valor del puntero "vect", donde el LSB es point[0] -void int32_to_pointer (int32_t dato, uint8_t *point);//función que coloca los valores de "dato" en el puntero "point", donde el LSB se encuentra en point[0]; - -#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vector_integer.cpp Wed Mar 29 02:17:17 2017 +0000
@@ -0,0 +1,23 @@
+#include "vector_integer.h"
+#include "mbed.h"
+//LOS VALORES SON DEVUELTOS EN FORMATO INT32; SIN EMBARGO SOLO SE REALIZAN CONVERSIONES EQUIVALENTES A VARIABLES DE 24BITS
+
+int pointer_to_int(char *vect) {
+ int aux1;
+ int result=0;
+ for (aux1 = 2; aux1>0; aux1--){
+ result= result|*(vect+aux1);
+ result <<= 8;
+ if((aux1==1)&&(*(vect+2)>127))
+ result = result|(0xff000000);
+ }
+ result= *vect|result;
+ return (result);
+}
+
+void int_to_pointer (int dato, char *point){
+ *(point) = dato;
+ *(point+1) = dato >> 8;
+ *(point+2) = dato >> 16;
+ *(point+3) = dato >> 24;
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vector_integer.h Wed Mar 29 02:17:17 2017 +0000 @@ -0,0 +1,11 @@ +#ifndef MBED_VECTOR_INTEGER_H +#define MBED_VECTOR_INTEGER_H + +#include "mbed.h" + +//LOS VALORES SON DEVUELTOS EN FORMATO INT32; SIN EMBARGO SOLO SE REALIZAN CONVERSIONES EQUIVALENTES A VARIABLES DE 24BITS + +int pointer_to_int (char *vect);//función que devuelve un int32 acorde al valor del puntero "vect", donde el LSB es point[0] +void int_to_pointer (int dato, char *point);//función que coloca los valores de "dato" en el puntero "point", donde el LSB se encuentra en point[0]; + +#endif \ No newline at end of file