hal

Embed object instead of collection in Spring HATEOAS

一世执手 提交于 2019-12-24 00:12:46
问题 A very quick question ,to which there seems to be no easy answer. Is it possible to put an object directly under the embedded resources using Spring HATEOAS? The desired output format in JSON should look like { ... _embedded: { myObject: { ... } } } Using the code below, I always end up with a colletion for any resource I want to embed. ArrayList<Resource<?>> embeddedContent = new ArrayList<>(); Resource<MyObject> myObjectResource = new Resource<MyObject>(new MyObject()); embeddedContent.add

What is required to make Android use a new Audio HAL

一个人想着一个人 提交于 2019-12-18 05:46:07
问题 I am writing a new Android Audio HAL, to let my App to feed audio to other apps, to allow my handheld remote microphone input to reach Google app. Essentially, a Virtual Audio Cable. Its a work in progress. I'll probably be overriding AUDIO_DEVICE_IN_BACK_MIC, but this is open for suggestions. I have doubts on how to make sure Android uses this HAL for input. Do I need to replace audio.primary.default.so or should I leave it as audio.vcable.default.so? More specifically: If I am not replacing

How to change HAL links format using Spring HATEOAS

痴心易碎 提交于 2019-12-17 23:18:39
问题 I'm building a Spring REST application using Spring HATEOAS (0.16.0.RELEASE) and I'd like the JSON links output to look like: _links: { self: { href: "https://<ip>/api/policies/321" } } while it renders like: "links": [{ "rel":"self", "href":"http://<ip>/api/policies/321" }] I'm using HATEOAS Resource and ResourceAssembler . Why do I get this format instead of the other? How can I change it? 回答1: In order to use HAL as the message format language for our RESTful API, and enable automatic

How to expose variable from HAL to shared libraries present in system/lib/hw (android)?

家住魔仙堡 提交于 2019-12-13 19:12:22
问题 I made some changes in the platform specific existing HAL, and I want this changes to be get selected when I start my audio stream. For this I need to differentiate it from other streams, so I added a variable in HAL and I wanted it to be exposed to my shared library that I will be pushing to system/lib/hw directory, so that when I start my stream I set this variable in my .so So that in HAL I can differentiate it from other streams. Any ideas to expose the variable in HAL to shared library

HAL_UART_Transmit_IT: only a few bytes are sent

你。 提交于 2019-12-13 09:35:52
问题 i've got a problem on my STM32F407 with FreeRTOS. So Far most of the messages to a xbee module are sent. Only Sometimes (after 5 to 60 minutes) the TX process will be interrupted. In the debug session i can see, that TXEIE ist not set anymore after the 2 bytes (of ~40). Also the TxXferCount of the UART_HandleTypeDef is 42 (TxXferSize: 44). The flag TXE in SR-Register ist set but the TXEIE in CR1-Register not. The ISR was active for 2 times to store them into data/shift registers. This i can

Stopwatch.GetTimeStamp on multiprocessors

☆樱花仙子☆ 提交于 2019-12-13 07:25:49
问题 Stopwatch.GetTimeStamp() may return different timing results on different processors because of bugs in the BIOS or the Hardware Abstraction Layer. Does anyone know what these bugs hold in store in concrete terms? Could timestamps on different processors potentially be totally unrelated - or would they be only off by some small amount (sub-milliseconds?) at most? Could numbers on different processors drift apart over time - which then would in effect lead to the aforementioned "timestamps

Receiving data from 2 UARTs, STM32F4-Discovery, HAL drivers

一笑奈何 提交于 2019-12-11 03:22:44
问题 I want to receive data from 2 sensors connected to my STM32F4-Discovery via 2 UARTs. Transmitting data from STM32 to sensors works but receiving doesn´t. Guarantee it isn´t a hardware problem. I found tutorials for 1 connected UART but not for 2 at once. I would like to use new HAL drivers and DMA for receiving. Thanks for help. UART_HandleTypeDef huart4; UART_HandleTypeDef huart5; DMA_HandleTypeDef hdma_uart4_rx; DMA_HandleTypeDef hdma_uart5_rx; uint8_t rxBuffer4 = '\000'; uint8_t rxBuffer5

STM32 HAL USART receive by interrupt

老子叫甜甜 提交于 2019-12-07 04:57:09
问题 I have some trouble to receive data over the USART. What I actually want to achieve ist, that I can receive a command over USART with no specific length (only a maximum possible length). So I use the interrupt routine to check each character received, but I somehow still cannot achieve what I want. The routine is called each time I receive a new character, but somehow HAL_UART_Receive_IT(&huart1,rx_data,buff_size_rx) does not upgrade in realtime, then I don't see the received character when I

从A33移植ICM20608D谈Android sensors移植

谁都会走 提交于 2019-12-05 11:48:53
在A33上移植ICM20608D,历时3.5天。回顾该Sneosr移植、调试历程,没有产生过多障碍及意外。可以说,一切按设想中的样子演进。16日下午完成了linux driver及android hal的移植,确认sensor工作正常,interrupt可产生,driver可作出响应。17日及18日,熟悉代码及调试。19日供应商现场支持,收官。 Android sensors的移植方法,可以概括为以下步骤: 确认硬件线路是否正确。 移植sensor driver。 脱离HAL层对driver及sensor进行调试,确认sensor工作是否正常,driver是否移植正确。 移植HAL层,结合HAL及driver调试。 必要时检查SensorService。 若上述5步做到位但未得到预期结果,迅速联系供应商做现场支持。 第1点不必多说,读懂原理图是作为嵌入式软件工程师的基本素质。 第2点是移植driver,一般来说,供应商会给到某平台的适用source code,不一定是全志平台,但必须是可用的,完整的source code。移植driver要做的工作一般是: linux core打开driver所需要的外部模块及代码。 根据平台特性加入driver private data。 根据平台特性加入bus识别sensor的代码。 根据平台特性完成中断/唤醒等gpio申请注册使用。

Qualcomm Camera HAL 2.0

可紊 提交于 2019-12-05 09:17:57
We know that in the HAL Vendor implementation of dynamic to load a name for the camera.$platform$.so file, then to define the load Android HAL, here to Camera HAL 2 and Qualcomm msm8960 for example, an article with before( ). (Note: This article is the draft is long, but has not been made, because this version code hand no device can run, also cannot determine whether the code is completely correct, at least found some places are stub implementation, this paper may have some mistakes, such as finding incorrect welcome that, I will try to find the mistakes and correct!) We know that a lot of